From 85ad599d7949c7865d01ea20c768877dab8b113f Mon Sep 17 00:00:00 2001 From: stephematician Date: Tue, 20 Sep 2022 15:24:35 +1000 Subject: [PATCH] Basic update to CMakeLists.txt to address #1116 (#1117) Add definitions to static yaml-cpp target (fixes #1116) Also updates CONTRIBUTING instructions for tests --- CMakeLists.txt | 3 ++- CONTRIBUTING.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2c3c62..ad4ea99 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ if (YAML_BUILD_SHARED_LIBS) else() set(yaml-cpp-type STATIC) set(yaml-cpp-label-postfix "static") - add_definitions(-DYAML_CPP_STATIC_DEFINE) endif() set(build-shared $) @@ -127,6 +126,8 @@ target_compile_options(yaml-cpp $<$:/W3 /wd4127 /wd4355>) target_compile_definitions(yaml-cpp + PUBLIC + $<$>:YAML_CPP_STATIC_DEFINE> PRIVATE $<${build-windows-dll}:${PROJECT_NAME}_DLL> $<$>:YAML_CPP_NO_CONTRIB>) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cd09a1a..5705fe2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ Commit messages should be in the imperative mood, as described in the [Git contr # Tests -Please verify the tests pass by running the target `tests/run_tests`. +Please verify the tests pass by running the target `test/yaml-cpp-tests`. If you are adding functionality, add tests accordingly.