Basic update to CMakeLists.txt to address #1116 (#1117)

Add definitions to static yaml-cpp target (fixes #1116)

Also updates CONTRIBUTING instructions for tests
This commit is contained in:
stephematician 2022-09-20 15:24:35 +10:00 committed by GitHub
parent c86a9e424c
commit 85ad599d79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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 $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
@ -127,6 +126,8 @@ target_compile_options(yaml-cpp
$<$<CXX_COMPILER_ID:MSVC>:/W3 /wd4127 /wd4355>)
target_compile_definitions(yaml-cpp
PUBLIC
$<$<NOT:$<BOOL:${YAML_BUILD_SHARED_LIBS}>>:YAML_CPP_STATIC_DEFINE>
PRIVATE
$<${build-windows-dll}:${PROJECT_NAME}_DLL>
$<$<NOT:$<BOOL:${YAML_CPP_BUILD_CONTRIB}>>:YAML_CPP_NO_CONTRIB>)

View File

@ -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.