Objective: Find and test the version of Yardl from within a CMake build environment.
Solution: Implement a CMake “Find” script for Yardl, similar to something like FindBISON.cmake:
https://cmake.org/cmake/help/latest/module/FindBISON.html
https://github.com/Kitware/CMake/blob/master/Modules/FindBISON.cmake
Essentially, it would just:
- Search for the yardl binary
- Run
yardl —version and collect output
- Pass the path and version to CMake’s
find_package_handle_standard_args, which ensures the version matches the one requested in CMakeLists.txt.
Objective: Find and test the version of Yardl from within a CMake build environment.
Solution: Implement a CMake “Find” script for Yardl, similar to something like
FindBISON.cmake:https://cmake.org/cmake/help/latest/module/FindBISON.html
https://github.com/Kitware/CMake/blob/master/Modules/FindBISON.cmake
Essentially, it would just:
yardl —versionand collect outputfind_package_handle_standard_args, which ensures the version matches the one requested in CMakeLists.txt.