Update CMakeLists.txt

Use YAML_CPP_MAIN_PROJECT instead of testing again
This commit is contained in:
Baruch 2022-08-08 08:50:03 +03:00 committed by GitHub
parent 2edc29ed04
commit 8df3d1f3b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,7 @@ if (NOT DEFINED CMAKE_CXX_STANDARD)
CXX_STANDARD 11)
endif()
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
if(YAML_CPP_MAIN_PROJECT)
target_compile_options(yaml-cpp
PRIVATE
$<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>