diff options
author | Brad King <brad.king@kitware.com> | 2019-04-30 14:03:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-30 14:03:20 (GMT) |
commit | b74061ba386a46d273bea37f377998a4e1936a65 (patch) | |
tree | 9d13b5421bd65d474afd8447d9922d39a48a3305 /Tests/RunCMake | |
parent | 71371e3d936c89945e4369c0daebe9c7e13dec31 (diff) | |
parent | 61f70e81a708db126ba5e2d1135ff0e2a5ffba25 (diff) | |
download | CMake-b74061ba386a46d273bea37f377998a4e1936a65.zip CMake-b74061ba386a46d273bea37f377998a4e1936a65.tar.gz CMake-b74061ba386a46d273bea37f377998a4e1936a65.tar.bz2 |
Merge topic 'msvc-runtime-library'
61f70e81a7 MSVC: Document and test behavior of empty MSVC_RUNTIME_LIBRARY
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3249
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/VS10Project/RuntimeLibrary.cmake | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake b/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake index 6b43d47..689b35f 100644 --- a/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake +++ b/Tests/RunCMake/VS10Project/RuntimeLibrary-check.cmake @@ -20,7 +20,7 @@ macro(RuntimeLibrary_check tgt rtl_expect) endif() endforeach() - if(NOT HAVE_Runtimelibrary) + if(NOT HAVE_Runtimelibrary AND NOT "${rtl_expect}" STREQUAL "") set(RunCMake_TEST_FAILED "Project file ${tgt}.vcxproj does not have a RuntimeLibrary field.") return() endif() @@ -28,6 +28,8 @@ endmacro() RuntimeLibrary_check(default-C MultiThreadedDebugDLL) RuntimeLibrary_check(default-CXX MultiThreadedDebugDLL) +RuntimeLibrary_check(empty-C "") +RuntimeLibrary_check(empty-CXX "") RuntimeLibrary_check(MTd-C MultiThreadedDebug) RuntimeLibrary_check(MTd-CXX MultiThreadedDebug) RuntimeLibrary_check(MT-C MultiThreaded) diff --git a/Tests/RunCMake/VS10Project/RuntimeLibrary.cmake b/Tests/RunCMake/VS10Project/RuntimeLibrary.cmake index 6c77a25..d7787c8 100644 --- a/Tests/RunCMake/VS10Project/RuntimeLibrary.cmake +++ b/Tests/RunCMake/VS10Project/RuntimeLibrary.cmake @@ -6,6 +6,10 @@ enable_language(CXX) add_library(default-C empty.c) add_library(default-CXX empty.cxx) +set(CMAKE_MSVC_RUNTIME_LIBRARY "") +add_library(empty-C empty.c) +add_library(empty-CXX empty.cxx) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebug") add_library(MTd-C empty.c) add_library(MTd-CXX empty.cxx) |