diff options
author | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2019-03-21 18:49:11 (GMT) |
---|---|---|
committer | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2019-05-24 06:43:42 (GMT) |
commit | 4819ff964714faec8ad2d92a3ee541b19196bcfc (patch) | |
tree | b9e8602e7ebf86a10c67b7fa7b919a230f3dee56 /Tests/RunCMake/try_compile | |
parent | 26af0b25e77ba48b6d015adef6d54b6725fd7977 (diff) | |
download | CMake-4819ff964714faec8ad2d92a3ee541b19196bcfc.zip CMake-4819ff964714faec8ad2d92a3ee541b19196bcfc.tar.gz CMake-4819ff964714faec8ad2d92a3ee541b19196bcfc.tar.bz2 |
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/RunCMake/try_compile')
-rw-r--r-- | Tests/RunCMake/try_compile/LinkOptions.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/RunCMake/try_compile/LinkOptions.cmake b/Tests/RunCMake/try_compile/LinkOptions.cmake index 488cab1..7fae35c 100644 --- a/Tests/RunCMake/try_compile/LinkOptions.cmake +++ b/Tests/RunCMake/try_compile/LinkOptions.cmake @@ -5,7 +5,9 @@ cmake_policy(SET CMP0054 NEW) set (lib_name "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}lib${CMAKE_STATIC_LIBRARY_SUFFIX}") if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - if (RunCMake_C_COMPILER_ID STREQUAL "MSVC" OR "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") + if (RunCMake_C_COMPILER_ID STREQUAL "MSVC" + OR ("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" AND + NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" OR "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")) if (CMAKE_SIZEOF_VOID_P EQUAL 4) set (undef_flag /INCLUDE:_func) else() |