how to pass cmake configure param
oskycar opened this issue · comments
option (YAML_CPP_BUILD_TESTS "Build yaml-cpp tests" OFF)
option (YAML_CPP_BUILD_TOOLS "Build yaml-cpp tools" OFF)
CPMAddPackage("gh:jbeder/yaml-cpp#0.8.0")
I want to import yaml-cpp lib , but don't want to build the test code . but I can't find any way to do this . CPMAddPackage function has any params to config it . and do it as upper code also can't have any effect.
You can use this instead:
CPMAddPackage(
NAME yaml-cpp
GITHUB_REPOSITORY jbeder/yaml-cpp
GIT_TAG 0.8.0
OPTIONS
"YAML_CPP_BUILD_TESTS OFF"
"YAML_CPP_BUILD_TOOLS OFF"
)