diff options
author | Brad King <brad.king@kitware.com> | 2021-10-19 13:22:11 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-10-19 13:22:22 (GMT) |
commit | d723bac01c4c866726c399004ba04018e83b4fdd (patch) | |
tree | b0e1d914007a00665b2b5fd025c01a9d917db452 /Tests/CMakeLists.txt | |
parent | cf554140070780ae961a0604a2d54e01aa480283 (diff) | |
parent | 02b2607a5cd8c4378a55fefdfe50d61f23dffec8 (diff) | |
download | CMake-d723bac01c4c866726c399004ba04018e83b4fdd.zip CMake-d723bac01c4c866726c399004ba04018e83b4fdd.tar.gz CMake-d723bac01c4c866726c399004ba04018e83b4fdd.tar.bz2 |
Merge topic 'lcc-compiler'
02b2607a5c Help: Add release note for MCST LCC compiler support
e5d9fce03f LCC: Add dedicated support for MCST LCC compiler
2b9ef77944 CPack/DEB: deal with broken dpkg-shlibdeps on E2K architecture
0995c75301 Tests/RPM: skip tests tat rely on debugedit if it's not found
ea55ac9a51 Tests/RunCMake/CommandLine: Deal with locales that are different from English
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6608
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index bb92c14..7a8e362 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -531,8 +531,8 @@ if(BUILD_TESTING) if (NOT CMAKE_GENERATOR STREQUAL "Xcode") ADD_TEST_MACRO(SourceFileIncludeDirProperty SourceFileIncludeDirProperty) endif() - if(CMAKE_CXX_COMPILER_ID STREQUAL GNU - AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) + if(CMAKE_CXX_COMPILER_ID STREQUAL "LCC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)) set(runCxxDialectTest 1) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL Clang @@ -670,7 +670,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) - if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC") include(CheckCXXCompilerFlag) check_cxx_compiler_flag(-fPIE run_pic_test) else() @@ -687,9 +687,10 @@ if(BUILD_TESTING) ADD_TEST_MACRO(PositionIndependentTargets PositionIndependentTargets) endif() - if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND + if(CMAKE_CXX_COMPILER_ID MATCHES "LCC" OR + ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS 4.2) AND - (CMAKE_SYSTEM_NAME MATCHES "Linux")) + (CMAKE_SYSTEM_NAME MATCHES "Linux"))) include(CheckCXXCompilerFlag) check_cxx_compiler_flag( @@ -2004,7 +2005,7 @@ if(BUILD_TESTING) set_tests_properties ( linkorder2 PROPERTIES DEPENDS linkorder1) # Test static linking on toolchains known to support it. - if(CMAKE_C_COMPILER_ID STREQUAL "GNU" + if((CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC") AND NOT APPLE AND NOT WIN32 AND NOT CYGWIN AND EXISTS "/usr/lib/libm.a") add_test(LinkStatic ${CMAKE_CTEST_COMMAND} @@ -3657,6 +3658,7 @@ if(BUILD_TESTING) if(CMAKE_GENERATOR MATCHES "^((Unix|MSYS) Makefiles|Ninja)$" AND ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + OR (CMAKE_CXX_COMPILER_ID STREQUAL "LCC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))) add_test(IncludeDirectoriesCPATH ${CMAKE_CTEST_COMMAND} --build-and-test |