summaryrefslogtreecommitdiff
path: root/Tests/EnforceConfig.cmake.in
diff options
context:
space:
mode:
authorZsolt Parragi <zsolt.parragi@cancellar.hu>2019-03-21 19:49:11 +0100
committerZsolt Parragi <zsolt.parragi@cancellar.hu>2019-05-24 08:43:42 +0200
commit4819ff964714faec8ad2d92a3ee541b19196bcfc (patch)
treeb9e8602e7ebf86a10c67b7fa7b919a230f3dee56 /Tests/EnforceConfig.cmake.in
parent26af0b25e77ba48b6d015adef6d54b6725fd7977 (diff)
downloadcmake-4819ff964714faec8ad2d92a3ee541b19196bcfc.tar.gz
Tests: fix failures with gnu mode clang on windows
Root causes were: * Using incorrect conditions (assuming MSVC-like command line mode) * Trying to compile the MSVC STL in C++11 mode, when parts of it require C++14 or enabling MS extensions in clang. * Missing flush in a testcase using stdout in a dll and a main part with static crt
Diffstat (limited to 'Tests/EnforceConfig.cmake.in')
-rw-r--r--Tests/EnforceConfig.cmake.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 8c0817cd68..b8a686097d 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -18,7 +18,12 @@ if(NOT CTEST_CONFIGURATION_TYPE)
endif()
endforeach()
if(NOT CTEST_CONFIGURATION_TYPE)
- set(CTEST_CONFIGURATION_TYPE NoConfig)
+ if("@CMAKE_C_COMPILER_ID@;@CMAKE_C_SIMULATE_ID@;@CMAKE_C_COMPILER_FRONTEND_VARIANT@" STREQUAL "Clang;MSVC;GNU")
+ # A valid configuration is required for this compiler in tests that do not set CMP0091 to NEW.
+ set(CTEST_CONFIGURATION_TYPE Debug)
+ else()
+ set(CTEST_CONFIGURATION_TYPE NoConfig)
+ endif()
endif()
message("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
endif()