diff options
author | Brad King <brad.king@kitware.com> | 2019-02-12 13:28:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-12 13:31:00 (GMT) |
commit | 9d2ab63aaf5fb29d812dbfc942da4d7671c5d1b3 (patch) | |
tree | 448336b84b0ea7c415be60b0281168a293c3eaf8 /Tests/Module | |
parent | 20afd497c92f66883de5dae92e2105c2f0cb4f70 (diff) | |
parent | 091afa7342e6c093f404b4777b81313535d73435 (diff) | |
download | CMake-9d2ab63aaf5fb29d812dbfc942da4d7671c5d1b3.zip CMake-9d2ab63aaf5fb29d812dbfc942da4d7671c5d1b3.tar.gz CMake-9d2ab63aaf5fb29d812dbfc942da4d7671c5d1b3.tar.bz2 |
Merge topic 'clangcl-fixes'
091afa7342 Tests: Teach tests when to treat clang-cl as MSVC
006768903c Work around clang-cl breakage on make_unique/std::forward
d625dfcdf9 Avoid compiling CMake itself as C++17 with Clang's MSVC ABI
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2573
Diffstat (limited to 'Tests/Module')
-rw-r--r-- | Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 45bb229..616092d 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -61,7 +61,7 @@ if (C_expected_features) string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" COMPILER_VERSION_PATCH "${CMAKE_C_COMPILER_VERSION}") if (CMAKE_C_COMPILER_ID STREQUAL "GNU" - OR CMAKE_C_COMPILER_ID STREQUAL "Clang" + OR (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_C_COMPILER_ID STREQUAL "Intel") add_executable(WriteCompilerDetectionHeader_C11 main.c) @@ -118,7 +118,7 @@ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" COMPILER_VERSION_MINO string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" COMPILER_VERSION_PATCH "${CMAKE_CXX_COMPILER_VERSION}") if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" - OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_CXX_COMPILER_ID STREQUAL "SunPro" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") @@ -128,7 +128,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" endif() # for msvc the compiler version determines which c++11 features are available. -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") if(";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;") list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) |