summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-19 13:22:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-19 13:22:22 (GMT)
commitd723bac01c4c866726c399004ba04018e83b4fdd (patch)
treeb0e1d914007a00665b2b5fd025c01a9d917db452 /Tests
parentcf554140070780ae961a0604a2d54e01aa480283 (diff)
parent02b2607a5cd8c4378a55fefdfe50d61f23dffec8 (diff)
downloadCMake-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')
-rw-r--r--Tests/Assembler/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/add_compile_options/CMakeLists.txt2
-rw-r--r--Tests/CMakeCommands/target_compile_options/CMakeLists.txt16
-rw-r--r--Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt2
-rw-r--r--Tests/CMakeLists.txt14
-rw-r--r--Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt2
-rw-r--r--Tests/CompileFeatures/cxx_generalized_initializers.cpp7
-rw-r--r--Tests/CompileOptions/CMakeLists.txt12
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt1
-rw-r--r--Tests/ExportImport/Import/A/CMakeLists.txt7
-rw-r--r--Tests/Fortran/CMakeLists.txt4
-rw-r--r--Tests/IncludeDirectories/CMakeLists.txt1
-rw-r--r--Tests/LinkStatic/CMakeLists.txt4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/BuildDepends/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CMP0119/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake27
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake2
-rw-r--r--Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt3
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake4
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake2
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/CommandLine/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py2
-rw-r--r--Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake2
-rw-r--r--Tests/RunCMake/target_compile_options/RunCMakeTest.cmake4
-rw-r--r--Tests/RunCMake/try_compile/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/try_run/RunCMakeTest.cmake2
-rw-r--r--Tests/SetLang/CMakeLists.txt2
-rw-r--r--Tests/TryCompile/CMakeLists.txt2
33 files changed, 95 insertions, 61 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index 0a2c819..65207d8 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -9,7 +9,7 @@ set(SRCS)
# and also generate assembler files from C:
if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND
NOT CMAKE_OSX_ARCHITECTURES MATCHES ";")
- if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX)
+ if((CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang|HP|SunPro|XL)$") OR (CMAKE_C_COMPILER_ID MATCHES "Intel" AND UNIX)
AND NOT (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC"))
set(C_FLAGS "${CMAKE_C_FLAGS}")
separate_arguments(C_FLAGS)
diff --git a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
index b28d0be..6e5160b 100644
--- a/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/add_compile_options/CMakeLists.txt
@@ -6,7 +6,7 @@ add_compile_options(-DTEST_OPTION)
add_executable(add_compile_options main.cpp)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(add_compile_options
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 268c7eb..362133e 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -7,14 +7,14 @@ add_executable(target_compile_options
"${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
)
target_compile_options(target_compile_options
- PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-DMY_PRIVATE_DEFINE>
- PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU>:-DMY_PUBLIC_DEFINE>
- PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>:-DMY_MUTLI_COMP_PUBLIC_DEFINE>
- INTERFACE $<$<CXX_COMPILER_ID:GNU>:-DMY_INTERFACE_DEFINE>
- INTERFACE $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-DMY_MULTI_COMP_INTERFACE_DEFINE>
+ PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU,LCC>:-DMY_PRIVATE_DEFINE>
+ PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC>:-DMY_PUBLIC_DEFINE>
+ PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC,Clang,AppleClang>:-DMY_MUTLI_COMP_PUBLIC_DEFINE>
+ INTERFACE $<$<CXX_COMPILER_ID:GNU,LCC>:-DMY_INTERFACE_DEFINE>
+ INTERFACE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang>:-DMY_MULTI_COMP_INTERFACE_DEFINE>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(target_compile_options
PRIVATE
"DO_GNU_TESTS"
@@ -47,10 +47,10 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio")
endif()
target_compile_options(consumer
- PRIVATE $<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
+ PRIVATE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(consumer
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
index 741c73e..83103cf 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/CMakeLists.txt
@@ -25,7 +25,7 @@ target_link_libraries(staticlib1 LINK_PUBLIC staticlib2)
# Try adding a private link item to be propagated out of a static lib.
set(private_link "")
-if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang)
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU OR CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES LCC)
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
set(private_link "-Wl,-V")
else()
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
diff --git a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
index aca99ce..9c203c7 100644
--- a/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
+++ b/Tests/CMakeOnly/CheckCXXCompilerFlag/CMakeLists.txt
@@ -57,7 +57,7 @@ else()
message("Unhandled Platform")
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
check_cxx_compiler_flag("-x c++" HAVE_X_CXX)
if(NOT HAVE_X_CXX)
message(FATAL_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
index bfe0d41..c4f47fe 100644
--- a/Tests/CompileFeatures/cxx_generalized_initializers.cpp
+++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp
@@ -11,8 +11,11 @@ class initializer_list
const _E* __begin_;
size_t __size_;
-#ifdef __INTEL_COMPILER
- // The Intel compiler internally asserts the constructor overloads, so
+#if defined(__INTEL_COMPILER) || \
+ (defined(__LCC__) && \
+ (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__)))
+ // Compilers based on EDG, such as Intel compiler and MCST LCC,
+ // internally assert the constructor overloads, so
// reproduce the constructor used in its <initializer_list> header.
initializer_list(const _E*, size_t) {}
#else
diff --git a/Tests/CompileOptions/CMakeLists.txt b/Tests/CompileOptions/CMakeLists.txt
index 1bedac0..e6db5b7 100644
--- a/Tests/CompileOptions/CMakeLists.txt
+++ b/Tests/CompileOptions/CMakeLists.txt
@@ -30,8 +30,8 @@ endif()
set_property(TARGET CompileOptions PROPERTY COMPILE_OPTIONS
"-DTEST_DEFINE"
"-DNEEDS_ESCAPE=\"E$CAPE\""
- "$<$<CXX_COMPILER_ID:GNU>:-DTEST_DEFINE_GNU>"
- "$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-DTEST_DEFINE_CXX_AND_GNU>"
+ "$<$<CXX_COMPILER_ID:GNU,LCC>:-DTEST_DEFINE_GNU>"
+ "$<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC>:-DTEST_DEFINE_CXX_AND_GNU>"
"SHELL:" # produces no options
${c_tests}
${cxx_tests}
@@ -49,15 +49,15 @@ else()
)
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|Borland|Embarcadero" AND NOT "${CMAKE_GENERATOR}" MATCHES "NMake Makefiles")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang|Borland|Embarcadero" AND NOT "${CMAKE_GENERATOR}" MATCHES "NMake Makefiles")
set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS
"-DTEST_OCTOTHORPE=\"#\""
)
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang|MSVC)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang|MSVC)$")
target_compile_definitions(CompileOptions PRIVATE "DO_FLAG_TESTS")
- if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang)$")
+ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|LCC|AppleClang)$")
string(APPEND CMAKE_CXX_FLAGS " -w")
endif()
string(APPEND CMAKE_CXX_FLAGS " -DFLAG_A=1 -DFLAG_B=1")
@@ -79,7 +79,7 @@ endif()
target_link_libraries(CompileOptions testlib)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
target_compile_definitions(CompileOptions
PRIVATE
"DO_GNU_TESTS"
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 7b33277..3a490c2 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -299,6 +299,7 @@ set_property(TARGET testSharedLibRequired
set_property(TARGET testSharedLibRequired APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS
$<$<CXX_COMPILER_ID:GNU>:-DCUSTOM_COMPILE_OPTION>
+ $<$<CXX_COMPILER_ID:LCC>:-DCUSTOM_COMPILE_OPTION>
)
add_library(testSharedLibRequiredUser SHARED testSharedLibRequiredUser.cpp)
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt
index 0cd703f..d6cc8d0 100644
--- a/Tests/ExportImport/Import/A/CMakeLists.txt
+++ b/Tests/ExportImport/Import/A/CMakeLists.txt
@@ -333,14 +333,14 @@ target_compile_definitions(deps_shared_iface
$<$<STREQUAL:$<TARGET_PROPERTY:CUSTOM_STRING>,testcontent>:CUSTOM_STRING_IS_MATCH>
)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
target_compile_definitions(deps_shared_iface
PRIVATE
"DO_GNU_TESTS"
)
endif()
-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()
@@ -373,7 +373,7 @@ endif()
add_executable(deps_shared_iface2 deps_shared_iface.cpp)
target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib)
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "LCC")
target_compile_definitions(deps_shared_iface2
PRIVATE
"DO_GNU_TESTS"
@@ -421,6 +421,7 @@ endforeach()
unset(_configs)
if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4)
+ OR CMAKE_C_COMPILER_ID MATCHES "LCC"
OR (CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"))
AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja"))
include(CheckCXXCompilerFlag)
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 2fc47a5..69899e9 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -14,7 +14,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "^(XL|VisualAge)$")
# We do not implement SHARED Fortran libs on AIX yet!
# Workaround: Set LINKER_LANGUAGE to C, which uses 'xlc' and Fortran implicits.
set(_SHARED STATIC)
-elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
# g77 2.96 does not support shared libs on Itanium because g2c is not -fPIC
execute_process(COMMAND ${CMAKE_Fortran_COMPILER} --version
OUTPUT_VARIABLE output ERROR_VARIABLE output)
@@ -26,7 +26,7 @@ endif()
# Pick a module .def file with the properly mangled symbol name.
set(world_def "")
if(WIN32 AND NOT CYGWIN)
- if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
+ if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
set(world_def world_gnu.def)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel" OR
CMAKE_GENERATOR MATCHES "Visual Studio") # Intel plugin
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt
index efbcb7e..dd29fe5 100644
--- a/Tests/IncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/CMakeLists.txt
@@ -4,6 +4,7 @@ project(IncludeDirectories)
if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.4)
OR (CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
OR CMAKE_C_COMPILER_ID STREQUAL AppleClang
+ OR CMAKE_C_COMPILER_ID STREQUAL LCC
OR ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" AND
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.29.30036.3" AND
NOT CMAKE_GENERATOR MATCHES "Visual Studio")) # No support for VS generators yet.
diff --git a/Tests/LinkStatic/CMakeLists.txt b/Tests/LinkStatic/CMakeLists.txt
index 200d4e5..60a270b 100644
--- a/Tests/LinkStatic/CMakeLists.txt
+++ b/Tests/LinkStatic/CMakeLists.txt
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 2.8.4.20110303 FATAL_ERROR)
project(LinkStatic C)
-if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
- message(FATAL_ERROR "This test works only with the GNU compiler!")
+if(NOT CMAKE_C_COMPILER_ID MATCHES "GNU|LCC")
+ message(FATAL_ERROR "This test works only with the GNU or LCC compiler!")
endif()
find_library(MATH_LIBRARY NAMES libm.a)
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index e406758..694073a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -52,7 +52,7 @@ endmacro()
# detailed features tables, not just meta-features
if (CMAKE_C_COMPILE_FEATURES)
- if (NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
set(C_expected_features ${CMAKE_C_COMPILE_FEATURES})
list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]")
endif()
@@ -95,7 +95,7 @@ if (C_expected_features)
endif()
if (CMAKE_CXX_COMPILE_FEATURES)
- if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES})
list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]")
endif()
diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
index 27bbff6..06f416b 100644
--- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
+++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake
@@ -159,6 +159,7 @@ endif()
if ((RunCMake_GENERATOR STREQUAL "Unix Makefiles"
AND (CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_C_COMPILER_ID STREQUAL "LCC"
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"))
OR (RunCMake_GENERATOR STREQUAL "NMake Makefiles"
diff --git a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
index e547ef5..7395827 100644
--- a/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0119/RunCMakeTest.cmake
@@ -12,6 +12,6 @@ if(NOT RunCMake_GENERATOR MATCHES "Visual Studio|Xcode" AND
run_CMP0119(WARN)
run_CMP0119(OLD)
endif()
-if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI)"))
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI)"))
run_CMP0119(NEW)
endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index e24ef58..c87c1b6 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -256,7 +256,7 @@ endif()
add_RunCMake_test(ArtifactOutputDirs)
if(NOT DEFINED CMake_TEST_BuildDepends_GNU_AS
- AND CMAKE_C_COMPILER_ID STREQUAL "GNU"
+ AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
AND CMAKE_GENERATOR MATCHES "^Ninja"
)
execute_process(COMMAND "${CMAKE_C_COMPILER}" -print-prog-name=as
@@ -682,7 +682,7 @@ set_property(TEST RunCMake.CheckCompilerFlag
add_RunCMake_test(CheckModules)
add_RunCMake_test(CheckIPOSupported)
if (CMAKE_SYSTEM_NAME MATCHES "(Linux|Darwin)"
- AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU"))
+ AND (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU|LCC" OR CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC"))
add_RunCMake_test(CheckLinkerFlag -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}
-DCMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}
-DCMake_TEST_CUDA=${CMake_TEST_CUDA}
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 7997c78..eb9ff03 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -3,13 +3,22 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
include(RunCMake)
include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake")
+# A debugedit binary is required for these tests, so skip them if it's not found
+find_program(DEBUGEDIT debugedit)
+
# run_cpack_test args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP "PACKAGING_TYPES"
run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM.CUSTOM_BINARY_SPEC_FILE" false "MONOLITHIC;COMPONENT")
run_cpack_test(CUSTOM_NAMES "RPM.CUSTOM_NAMES;DEB.CUSTOM_NAMES;TGZ;DragNDrop" true "COMPONENT")
-run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT")
+run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(DEBUGINFO "RPM.DEBUGINFO" true "COMPONENT")
+endif()
run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "MONOLITHIC")
run_cpack_test_subtests(DEFAULT_PERMISSIONS "CMAKE_var_set;CPACK_var_set;both_set;invalid_CMAKE_var;invalid_CPACK_var" "RPM.DEFAULT_PERMISSIONS;DEB.DEFAULT_PERMISSIONS" false "MONOLITHIC;COMPONENT")
-run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES;DEB.DEPENDENCIES" true "COMPONENT")
+run_cpack_test(DEPENDENCIES "DEB.DEPENDENCIES" true "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES" true "COMPONENT")
+endif()
run_cpack_test(DIST "RPM.DIST" false "MONOLITHIC")
run_cpack_test(DMG_SLA "DragNDrop" false "MONOLITHIC")
run_cpack_test(EMPTY_DIR "RPM.EMPTY_DIR;DEB.EMPTY_DIR;TGZ" true "MONOLITHIC;COMPONENT")
@@ -17,7 +26,10 @@ run_cpack_test(VERSION "RPM.VERSION;DEB.VERSION" false "MONOLITHIC;COMPONENT")
run_cpack_test(EXTRA "DEB.EXTRA" false "COMPONENT")
run_cpack_test_subtests(GENERATE_SHLIBS "soversion_not_zero;soversion_zero" "DEB.GENERATE_SHLIBS" true "COMPONENT")
run_cpack_test(GENERATE_SHLIBS_LDCONFIG "DEB.GENERATE_SHLIBS_LDCONFIG" true "COMPONENT")
-run_cpack_test_subtests(INSTALL_SCRIPTS "default;single_debug_info;no_scripts;no_scripts_single_debug_info" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+run_cpack_test_subtests(INSTALL_SCRIPTS "default;no_scripts" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test_subtests(INSTALL_SCRIPTS "single_debug_info;no_scripts_single_debug_info" "RPM.INSTALL_SCRIPTS" false "COMPONENT")
+endif()
run_cpack_test(LONG_FILENAMES "DEB.LONG_FILENAMES" false "MONOLITHIC")
run_cpack_test_subtests(MAIN_COMPONENT "invalid;found" "RPM.MAIN_COMPONENT" false "COMPONENT")
run_cpack_test(MINIMAL "RPM.MINIMAL;DEB.MINIMAL;7Z;TBZ2;TGZ;TXZ;TZ;ZIP;STGZ;External" false "MONOLITHIC;COMPONENT")
@@ -27,8 +39,13 @@ run_cpack_test_package_target(THREADED "TXZ;DEB" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(PACKAGE_CHECKSUM "invalid;MD5;SHA1;SHA224;SHA256;SHA384;SHA512" "TGZ" false "MONOLITHIC")
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM.PARTIALLY_RELOCATABLE_WARNING" false "COMPONENT")
run_cpack_test(PER_COMPONENT_FIELDS "RPM.PER_COMPONENT_FIELDS;DEB.PER_COMPONENT_FIELDS" false "COMPONENT")
-run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component;one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
-run_cpack_test(EXTRA_SLASH_IN_PATH "RPM.EXTRA_SLASH_IN_PATH" true "COMPONENT")
+run_cpack_test_subtests(SINGLE_DEBUGINFO "no_main_component" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test_subtests(SINGLE_DEBUGINFO "one_component;one_component_main;no_debuginfo;one_component_no_debuginfo;no_components;valid" "RPM.SINGLE_DEBUGINFO" true "CUSTOM")
+endif()
+if(NOT "${DEBUGEDIT}" STREQUAL "DEBUGEDIT-NOTFOUND")
+ run_cpack_test(EXTRA_SLASH_IN_PATH "RPM.EXTRA_SLASH_IN_PATH" true "COMPONENT")
+endif()
run_cpack_source_test(SOURCE_PACKAGE "RPM.SOURCE_PACKAGE")
run_cpack_test(SUGGESTS "RPM.SUGGESTS" false "MONOLITHIC")
run_cpack_test(SYMLINKS "RPM.SYMLINKS;TGZ" false "MONOLITHIC;COMPONENT")
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
index e9cebbf..1d21dec 100644
--- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
@@ -1,7 +1,7 @@
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
# Some compilers do not add build id to binaries by default.
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(IntelLLVM|PGI|NVHPC)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|IntelLLVM|PGI|NVHPC)$")
string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id")
endif()
diff --git a/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt b/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
index 5df274a..df777ea 100644
--- a/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
+++ b/Tests/RunCMake/CPack/tests/DEPENDENCIES/DEB-stderr.txt
@@ -1 +1,2 @@
-^CPackDeb: ((- Generating dependency list)|(Using only user-provided dependencies because dpkg-shlibdeps is not found\.))$
+^CPackDeb: ((- Generating dependency list)(
+CMake Warning.*broken dpkg-shlibdeps on E2K detected.*\(cpack_deb_prepare_package_vars\))?|(Using only user-provided dependencies because dpkg-shlibdeps is not found\.))$
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
index 6483f11..79d67e5 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCCompilerFlag.cmake
@@ -9,14 +9,14 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid C compile flag didn't fail.")
endif()
-if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
check_compiler_flag(C "-x c" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-x c' check failed")
endif()
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU") # LCC C compiler silently ignore -frtti instead of failing, so skip it here.
check_compiler_flag(C "-frtti" SHOULD_FAIL_RTTI)
if(SHOULD_FAIL_RTTI)
message(SEND_ERROR "${CMAKE_C_COMPILER_ID} compiler flag '-frtti' check passed but should have failed")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
index 60e9755..4b20ebd 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckCXXCompilerFlag.cmake
@@ -9,7 +9,7 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid CXX compile flag didn't fail.")
endif()
-if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC|Clang" AND NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
check_compiler_flag(CXX "-x c++" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_CXX_COMPILER_ID} compiler flag '-x c++' check failed")
diff --git a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
index 7bb88b1..236f37b 100644
--- a/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
+++ b/Tests/RunCMake/CheckCompilerFlag/CheckFortranCompilerFlag.cmake
@@ -8,7 +8,7 @@ if(SHOULD_FAIL)
message(SEND_ERROR "invalid Fortran compile flag didn't fail.")
endif()
-if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU|LCC")
check_compiler_flag(Fortran "-Wall" SHOULD_WORK)
if(NOT SHOULD_WORK)
message(SEND_ERROR "${CMAKE_Fortran_COMPILER_ID} compiler flag '-Wall' check failed")
diff --git a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
index 5e5bff6..39fc430 100644
--- a/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckLinkerFlag/RunCMakeTest.cmake
@@ -1,6 +1,6 @@
include(RunCMake)
-if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
+if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU|LCC")
run_cmake(CheckCLinkerFlag)
run_cmake(CheckCXXLinkerFlag)
if (APPLE)
@@ -9,7 +9,7 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
endif()
endif()
-if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
+if (CMAKE_Fortran_COMPILER_ID MATCHES "GNU|LCC")
run_cmake(CheckFortranLinkerFlag)
endif()
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index dc066f1..74cd90a 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -247,8 +247,14 @@ function(run_BuildDir)
run_cmake_command(BuildDir--build-jobs-no-number-trailing--target ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -j --target CustomTarget)
if(RunCMake_GENERATOR MATCHES "Unix Makefiles" OR RunCMake_GENERATOR MATCHES "Ninja")
+ set(_backup_lang "$ENV{LANG}")
+ set(_backup_lc_messages "$ENV{LC_MESSAGES}")
+ set(ENV{LANG} "C")
+ set(ENV{LC_MESSAGES} "C")
run_cmake_command(BuildDir--build-jobs-no-number-trailing--invalid-target ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build -j --target invalid-target)
+ set(ENV{LANG} "${_backup_lang}")
+ set(ENV{LC_MESSAGES} "${_backup_lc_messages}")
endif()
run_cmake_command(BuildDir--build--parallel-no-number ${CMAKE_COMMAND} -E chdir ..
${CMAKE_COMMAND} --build BuildDir-build --parallel)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index 6cf57a3..92a64f9 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -731,7 +731,7 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/generated_exe.json"),
]
- if cxx_compiler_id in ['Clang', 'AppleClang', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
+ if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
for e in expected:
if e["name"] == "cxx_exe":
if matches(g["name"], "^(Visual Studio |Ninja Multi-Config)"):
diff --git a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
index 6efa0d4..468b80a 100644
--- a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
+++ b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake
@@ -26,6 +26,7 @@ if (PIE_SUPPORTED OR NO_PIE_SUPPORTED)
if ((READELF OR OTOOL) AND
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "LCC"
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
macro(run_cmake_target test subtest)
diff --git a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
index 3e7fb30..ac3bf59 100644
--- a/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
+++ b/Tests/RunCMake/PrecompileHeaders/PchWarnInvalid-check.cmake
@@ -1,4 +1,4 @@
-if (NOT CMAKE_C_COMPILER_ID MATCHES "GNU|Intel" OR
+if (NOT CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Intel" OR
(CMAKE_C_COMPILER_ID STREQUAL "Intel" AND CMAKE_HOST_WIN32))
return()
endif()
diff --git a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
index 806ae79..f726759 100644
--- a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake
@@ -2,7 +2,7 @@ include(RunCMake)
run_cmake(empty_keyword_args)
-if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
+if (CMAKE_C_COMPILER_ID MATCHES "GNU|LCC|Clang")
macro(run_cmake_target test subtest target)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build)
set(RunCMake_TEST_OUTPUT_MERGE 1)
@@ -28,7 +28,7 @@ function(run_Order)
run_cmake_command(Order-build ${CMAKE_COMMAND} --build . --verbose --config Custom)
endfunction()
if(RunCMake_GENERATOR MATCHES "Ninja|Make" AND
- CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$" AND
+ CMAKE_C_COMPILER_ID MATCHES "^(GNU|LCC|Clang|AppleClang)$" AND
NOT CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
run_Order()
endif()
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index fffb038..28a990d 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -26,7 +26,7 @@ run_cmake(TargetTypeInvalid)
run_cmake(TargetTypeStatic)
if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND
- CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$")
+ CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|LCC|Clang|AppleClang)$")
set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
run_cmake(LinkOptions)
unset (RunCMake_TEST_OPTIONS)
@@ -60,10 +60,10 @@ if(CMake_TEST_ISPC)
endif()
run_cmake(ISPCDuplicateTarget${ninja})
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
+if(CMAKE_C_COMPILER_ID MATCHES "GNU|LCC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4)
run_cmake(CStandardGNU)
endif()
-if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
+if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
run_cmake(CxxStandardGNU)
endif()
diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake
index fa30eb4..d74add0 100644
--- a/Tests/RunCMake/try_run/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake
@@ -3,7 +3,7 @@ include(RunCMake)
run_cmake(BadLinkLibraries)
if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND
- CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$")
+ CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|LCC|Clang|AppleClang)$")
set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID})
run_cmake(LinkOptions)
unset (RunCMake_TEST_OPTIONS)
diff --git a/Tests/SetLang/CMakeLists.txt b/Tests/SetLang/CMakeLists.txt
index 80348ab..5b2eb19 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -20,7 +20,7 @@ if(CMAKE_GENERATOR MATCHES "^Visual Studio" AND "x${CMAKE_C_COMPILER_ID}" STREQU
set_property(TARGET stay PROPERTY COMPILE_OPTIONS "-TP")
endif()
-if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
+if((CMAKE_C_COMPILER_ID MATCHES "(GNU|LCC|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
cmake_policy(SET CMP0119 NEW)
add_library(zoom zoom.zzz)
set_source_files_properties(zoom.zzz PROPERTIES LANGUAGE CXX)
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index d0c413f..e35e0d3 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -321,7 +321,7 @@ if(DEFINED CXX_BOGUS_FLAG)
message(SEND_ERROR "CHECK_CXX_COMPILER_FLAG shouldn't construct CXX_BOGUS_FLAG as a normal variable")
endif()
-if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "LCC")
unset(C_STRICT_PROTOTYPES CACHE)
CHECK_C_COMPILER_FLAG("-Werror;-Wstrict-prototypes" C_STRICT_PROTOTYPES)
TEST_ASSERT(C_STRICT_PROTOTYPES "CHECK_C_COMPILER_FLAG failed -Werror -Wstrict-prototypes")