You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With CAPSTONE_BUILD_CSTEST, cmake should able to build cstest. It should attempt to build libyaml from source if not found as stated in the BUILDING.md.
Actual behavior
CMake gives following error message
Could not find libyaml using the following names: libyaml, yaml
From the CMakeLists.txt in suite/cstest/CMakeLists.txt, it contains the following lines
find_library(libyaml
NAMES libyaml yaml
REQUIRED)
while having external project for libcyaml.
The text was updated successfully, but these errors were encountered:
libcyaml depends on libyaml. libcyaml is basically a wrapper around the very raw access libyaml provides to parse yaml files.
I added it back then, because I was under time constraints. So just using libyaml would have been too much code to write.
Now, why is libyaml a dependency cmake doesn't resolve on its own (by downloading it and building it)?
Because libcyaml and libyaml are both ExternalProjects, and I struggled on making them depend on each other. Meaning: first libyaml is checked and maybe built if not present. And then libcyaml.
It didn't seem (or still isn't) possible to do it without some extra work or weird hacks.
This "making an ExternalProject depend on another ExternalProject" isn't easily done last time I checked.
I might have overlooked something, but due to the mentioned time constraints I had to stop looking at it and made libyaml a dependency the developer has to install on her own.
I documented this in suite/cstest/README.md but apparently forgot to add a note about it in the BUILDING.md.
If you could open a PR to add this note, I would really appreciate it.
Work environment
Expected behavior
With
CAPSTONE_BUILD_CSTEST
, cmake should able to build cstest. It should attempt to build libyaml from source if not found as stated in theBUILDING.md
.Actual behavior
CMake gives following error message
From the
CMakeLists.txt
insuite/cstest/CMakeLists.txt
, it contains the following lineswhile having external project for
libcyaml
.The text was updated successfully, but these errors were encountered: