summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorAaron Liu <hualilia@ca.ibm.com>2021-12-02 15:34:01 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-27 14:38:01 (GMT)
commit6da99e671c59a5b5b4731020cc286bb873a8134e (patch)
tree72cf89744dd3bfcb047fc50c6de41533c59833f6 /Tests
parent28e90f9576fa5784408c03cf20bf172b20e418f0 (diff)
downloadCMake-6da99e671c59a5b5b4731020cc286bb873a8134e.zip
CMake-6da99e671c59a5b5b4731020cc286bb873a8134e.tar.gz
CMake-6da99e671c59a5b5b4731020cc286bb873a8134e.tar.bz2
IBMClang: Add support for IBM Open XL C/C++
Fixes: #22929
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeCommands/target_compile_options/CMakeLists.txt8
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt4
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/FileAPI/codemodel-v2-check.py2
5 files changed, 10 insertions, 10 deletions
diff --git a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
index 869a941..2e3760a 100644
--- a/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_options/CMakeLists.txt
@@ -11,11 +11,11 @@ add_executable(target_compile_options
"${CMAKE_CURRENT_SOURCE_DIR}/main.cpp"
)
target_compile_options(target_compile_options
- PRIVATE $<$<CXX_COMPILER_ID:AppleClang,Clang,GNU,LCC>:-DMY_PRIVATE_DEFINE>
+ PRIVATE $<$<CXX_COMPILER_ID:AppleClang,IBMClang,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>
+ PUBLIC $<$<COMPILE_LANG_AND_ID:CXX,GNU,LCC,Clang,AppleClang,IBMClang>:-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>
+ INTERFACE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang,IBMClang>:-DMY_MULTI_COMP_INTERFACE_DEFINE>
)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
@@ -51,7 +51,7 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio")
endif()
target_compile_options(consumer
- PRIVATE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
+ PRIVATE $<$<CXX_COMPILER_ID:GNU,LCC,Clang,AppleClang,IBMClang>:$<TARGET_PROPERTY:target_compile_options,INTERFACE_COMPILE_OPTIONS>>
)
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|LCC")
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index 20988ac..c6d1e8a 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -18,7 +18,7 @@ macro(run_test feature lang)
endif()
endmacro()
-if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$")
get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
list(FILTER c_features EXCLUDE REGEX "^c_std_[0-9][0-9]")
foreach(feature ${c_features})
@@ -26,7 +26,7 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujits
endforeach()
endif()
-if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|IntelLLVM|Fujitsu|FujitsuClang)$")
get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
list(FILTER cxx_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]")
foreach(feature ${cxx_features})
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index 8898f3b..0df05b9 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -55,7 +55,7 @@ endmacro()
# detailed features tables, not just meta-features
if (CMAKE_C_COMPILE_FEATURES)
- if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_C_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IBMClang|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()
@@ -98,7 +98,7 @@ if (C_expected_features)
endif()
if (CMAKE_CXX_COMPILE_FEATURES)
- if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IntelLLVM|Fujitsu|FujitsuClang)$")
+ if (NOT CMAKE_CXX_COMPILER_ID MATCHES "^(LCC|Cray|PGI|NVHPC|XL|XLClang|IBMClang|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/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 6bea788..f1c0e40 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -330,7 +330,7 @@ add_RunCMake_test(TargetPropertyGeneratorExpressions)
add_RunCMake_test(Languages)
add_RunCMake_test(LinkItemValidation)
add_RunCMake_test(LinkStatic)
-if(CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|Fujitsu|FujitsuClang)$")
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|NVHPC|XL|XLClang|IBMClang|Fujitsu|FujitsuClang)$")
add_RunCMake_test(MetaCompileFeatures)
endif()
if(MSVC)
diff --git a/Tests/RunCMake/FileAPI/codemodel-v2-check.py b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
index b31088d..d5f596e 100644
--- a/Tests/RunCMake/FileAPI/codemodel-v2-check.py
+++ b/Tests/RunCMake/FileAPI/codemodel-v2-check.py
@@ -760,7 +760,7 @@ def gen_check_targets(c, g, inSource):
read_codemodel_json_data("targets/c_headers_2.json"),
]
- if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero'] and g["name"] != "Xcode":
+ if cxx_compiler_id in ['Clang', 'AppleClang', 'LCC', 'GNU', 'Intel', 'IntelLLVM', 'MSVC', 'Embarcadero', 'IBMClang'] and g["name"] != "Xcode":
for e in expected:
if e["name"] == "cxx_exe":
if matches(g["name"], "^(Visual Studio |Ninja Multi-Config)"):