Skip to content

Commit 689ef5f

Browse files
authored
[offload] [test] Use test compiler ID rather than host (llvm#124408)
Use the test compiler ID to verify whether tests can be run rather than the host compiler. This makes it possible to run tests (with Clang) while the library itself was built with GCC.
1 parent 359a913 commit 689ef5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

offload/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CMakeLists.txt file for unit testing OpenMP offloading runtime library.
2-
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
3-
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0.0)
2+
if(NOT OPENMP_TEST_COMPILER_ID STREQUAL "Clang" OR
3+
OPENMP_TEST_COMPILER_VERSION VERSION_LESS 6.0.0)
44
message(STATUS "Can only test with Clang compiler in version 6.0.0 or later.")
55
message(WARNING "The check-offload target will not be available!")
66
return()

0 commit comments

Comments
 (0)