diff options
author | Brad King <brad.king@kitware.com> | 2019-05-29 13:21:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-29 13:22:12 (GMT) |
commit | 067a4f484b1e2f650918d90051653b5c434c77a2 (patch) | |
tree | e0d9e8dd16e4518988067865f3f922f13a512b71 /Tests/RunCMake | |
parent | 8b42d560028b8da0a3cf7e1a14962f2245d21227 (diff) | |
parent | 74829f01b13de0031e659bf8dac3e6672fbfa77b (diff) | |
download | CMake-067a4f484b1e2f650918d90051653b5c434c77a2.zip CMake-067a4f484b1e2f650918d90051653b5c434c77a2.tar.gz CMake-067a4f484b1e2f650918d90051653b5c434c77a2.tar.bz2 |
Merge topic 'clang-gnulike-support'
74829f01b1 Help: Add notes for topic 'clang-gnulike-support'
19669abe1d Tests: handle string escaping differences with NMake+clang
a2a90f41e3 Tests: require C++14 for the Tutorial
4819ff9647 Tests: fix failures with gnu mode clang on windows
26af0b25e7 cmake: use correct stack size with gnu mode clang on windows
d44c0db0b2 clang: setup correct configuration in gnu mode
b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode
3d0210d8dc binutils: add the llvm-* variants to the tool lists.
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francesco Bertolaccini <francesco@bertolaccini.dev>
Acked-by: Stanislav Ershov <digital.stream.of.mind@gmail.com>
Acked-by: Saleem Abdulrasool <compnerd@compnerd.org>
Merge-request: !2992
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/GenerateExportHeader/GEH.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/greeting.c | 1 | ||||
-rw-r--r-- | Tests/RunCMake/Ninja/greeting2.c | 1 | ||||
-rw-r--r-- | Tests/RunCMake/try_compile/LinkOptions.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/LinkOptions.cmake | 4 |
5 files changed, 13 insertions, 2 deletions
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index ae9a84c..b3f1c7f 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -51,6 +51,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND set(CMAKE_CXX_STANDARD 11) endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") + set(CMAKE_CXX_STANDARD 14) +endif() + add_subdirectory(lib_shared_and_static) if(CMAKE_SYSTEM_NAME MATCHES "AIX" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" diff --git a/Tests/RunCMake/Ninja/greeting.c b/Tests/RunCMake/Ninja/greeting.c index ba3e55b..1124d14 100644 --- a/Tests/RunCMake/Ninja/greeting.c +++ b/Tests/RunCMake/Ninja/greeting.c @@ -6,4 +6,5 @@ __declspec(dllexport) void greeting(void) { printf("Hello world!\n"); + fflush(stdout); } diff --git a/Tests/RunCMake/Ninja/greeting2.c b/Tests/RunCMake/Ninja/greeting2.c index c6ed87d..cc8409c 100644 --- a/Tests/RunCMake/Ninja/greeting2.c +++ b/Tests/RunCMake/Ninja/greeting2.c @@ -3,4 +3,5 @@ void greeting2(void) { printf("Hello world 2!\n"); + fflush(stdout); } 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() diff --git a/Tests/RunCMake/try_run/LinkOptions.cmake b/Tests/RunCMake/try_run/LinkOptions.cmake index 9939a42..b9a87f3 100644 --- a/Tests/RunCMake/try_run/LinkOptions.cmake +++ b/Tests/RunCMake/try_run/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() |