Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to pass cmake configure param #530

Open
oskycar opened this issue Jan 2, 2024 · 2 comments
Open

how to pass cmake configure param #530

oskycar opened this issue Jan 2, 2024 · 2 comments

Comments

@oskycar
Copy link

oskycar commented Jan 2, 2024

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.

@threeal
Copy link
Contributor

threeal commented Jan 10, 2024

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"
)

@ScottBailey
Copy link
Contributor

@oskycar I think this demonstrates how to do what you need. Can you close this issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants