Merge 78d6f4e925 into 39f737443b
This commit is contained in:
commit
7643534323
@ -53,9 +53,10 @@ endif()
|
|||||||
|
|
||||||
set(build-shared $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
|
set(build-shared $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
|
||||||
set(build-windows-dll $<AND:$<BOOL:${CMAKE_HOST_WIN32}>,${build-shared}>)
|
set(build-windows-dll $<AND:$<BOOL:${CMAKE_HOST_WIN32}>,${build-shared}>)
|
||||||
set(not-msvc $<NOT:$<CXX_COMPILER_ID:MSVC>>)
|
|
||||||
set(msvc-shared_rt $<BOOL:${YAML_MSVC_SHARED_RT}>)
|
set(msvc-shared_rt $<BOOL:${YAML_MSVC_SHARED_RT}>)
|
||||||
|
|
||||||
|
set(print-warnings $<NOT:$<OR:$<CXX_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:NVHPC>>>)
|
||||||
|
|
||||||
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY
|
set(CMAKE_MSVC_RUNTIME_LIBRARY
|
||||||
MultiThreaded$<$<CONFIG:Debug>:Debug>$<${msvc-shared_rt}:DLL>)
|
MultiThreaded$<$<CONFIG:Debug>:Debug>$<${msvc-shared_rt}:DLL>)
|
||||||
@ -111,8 +112,8 @@ endif()
|
|||||||
if(YAML_CPP_MAIN_PROJECT)
|
if(YAML_CPP_MAIN_PROJECT)
|
||||||
target_compile_options(yaml-cpp
|
target_compile_options(yaml-cpp
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>
|
$<${print-warnings}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>
|
||||||
$<${not-msvc}:-pedantic -pedantic-errors>)
|
$<${print-warnings}:-pedantic -pedantic-errors>)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_compile_options(yaml-cpp
|
target_compile_options(yaml-cpp
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user