From 1ad19ceb44d779ce38873d806183a43d290a9c28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 25 Jan 2025 14:46:22 +0100 Subject: [PATCH] [offload] [test] Use test compiler ID rather than host 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. --- offload/test/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/offload/test/CMakeLists.txt b/offload/test/CMakeLists.txt index 8a827e0a625ef..4768d9ccf223b 100644 --- a/offload/test/CMakeLists.txt +++ b/offload/test/CMakeLists.txt @@ -1,6 +1,6 @@ # CMakeLists.txt file for unit testing OpenMP offloading runtime library. -if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR - CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0.0) +if(NOT OPENMP_TEST_COMPILER_ID STREQUAL "Clang" OR + OPENMP_TEST_COMPILER_VERSION VERSION_LESS 6.0.0) message(STATUS "Can only test with Clang compiler in version 6.0.0 or later.") message(WARNING "The check-offload target will not be available!") return()