diff options
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 |