Skip to content

Commit 4b6e671

Browse files
committed
Updated util/test_llvm_versions.sh script
1 parent fdfd89a commit 4b6e671

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

cmake/LLVMSetup.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
message(STATUS "Checking for LLVM and Clang...")
22

3-
if(LLVM_VERSION STREQUAL "18")
4-
set(LLVM_VERSION "18.1")
5-
endif()
6-
73
# If user provided a path to llvm-config executable use it to detect
84
# LLVM Version and appropriate CMake module path
95
if(NOT "${LLVM_CONFIG_PATH}" STREQUAL "")
@@ -26,6 +22,10 @@ if(NOT "${LLVM_CONFIG_PATH}" STREQUAL "")
2622
set(LLVM_VERSION ${CMAKE_MATCH_1})
2723
endif()
2824

25+
if(LLVM_VERSION STREQUAL "18")
26+
set(LLVM_VERSION "18.1")
27+
endif()
28+
2929
find_package(LLVM ${LLVM_VERSION} CONFIG REQUIRED)
3030

3131
list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR})

tests/t00075/test_case.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ TEST_CASE("t00075")
3232
REQUIRE(IsEnum(src, {"ns1::ns2", "E"}));
3333

3434
REQUIRE(IsConcept(src, {"ns1::ns2", "C<T>"}));
35-
35+
#if (LLVM_VERSION_MAJOR == 13) || (LLVM_VERSION_MAJOR == 14)
36+
REQUIRE(IsConceptRequirement(src, "C<T>", "T({})"));
37+
#else
3638
REQUIRE(IsConceptRequirement(src, "C<T>", "T{}"));
39+
#endif
3740
REQUIRE(IsConceptRequirement(src, "C<T>", "t.e()"));
3841
REQUIRE(IsConceptParameterList(src, "C<T>", "(T t)"));
3942
REQUIRE(!IsConceptParameterList(src, "C<T>", "(T ns1::ns2::t)"));

util/test_llvm_versions.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
#!/bin/bash
22

3+
set -e
4+
trap 'echo "Build failed!"' ERR
5+
36
declare -a llvm_configs=("llvm-config-12"
47
"llvm-config-13"
58
"llvm-config-14"
69
"llvm-config-15"
710
"llvm-config-16"
8-
"llvm-config-17")
11+
"llvm-config-17"
12+
"llvm-config-18")
913

14+
# Test with GCC and different LLVM versions
1015
for config_path in ${llvm_configs[@]}; do
1116
echo "---------------------------------------------------------"
1217
echo " Running clang-uml tests against LLVM $(${config_path} --version)"
1318
echo "---------------------------------------------------------"
1419
make clean
15-
LLVM_CONFIG_PATH=$config_path NUMPROC=12 make test
16-
done
20+
CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 LLVM_CONFIG_PATH=$config_path NUMPROC=16 make test
21+
done
22+
23+
# Also check compilation with Clang
24+
make clean
25+
CC=/usr/bin/clang-17 CXX=/usr/bin/clang++-17 LLVM_VERSION=17 NUMPROC=16 CMAKE_GENERATOR=Ninja ENABLE_CXX_MODULES_TEST_CASES=ON ENABLE_CUDA_TEST_CASES=ON make test
26+
make clean
27+
CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 LLVM_VERSION=18 NUMPROC=16 CMAKE_GENERATOR=Ninja ENABLE_CXX_MODULES_TEST_CASES=ON ENABLE_CUDA_TEST_CASES=ON make test
28+
make clean

0 commit comments

Comments
 (0)