diff --git a/cmake/host_compiler_id.cmake b/cmake/host_compiler_id.cmake index 1b8fb51a5b0..e6d49014d6b 100644 --- a/cmake/host_compiler_id.cmake +++ b/cmake/host_compiler_id.cmake @@ -85,7 +85,7 @@ message(STATUS "Host compiler kind: ${DPCPP_HOST_COMPILER_KIND}") # Preprocessor prints out major and minor versions of the compiler when # compiling host_compiler_id.cpp. Using the regex below to extract # the versions from the preprocessor message. -string(REGEX MATCH "([0-9]+\\.[0-9]+)" _ "${STDERR_MESSAGE}") +string(REGEX MATCH "host compiler version: ([0-9]+\\.[0-9]+)" _ "${STDERR_MESSAGE}") set(DPCPP_HOST_COMPILER_VER ${CMAKE_MATCH_1} CACHE INTERNAL "") string(REPLACE "." ";" DPCPP_HOST_COMPILER_VER_LIST ${DPCPP_HOST_COMPILER_VER}) diff --git a/cmake/host_compiler_id.cpp b/cmake/host_compiler_id.cpp index a9f6758226d..64fb07a619d 100644 --- a/cmake/host_compiler_id.cpp +++ b/cmake/host_compiler_id.cpp @@ -21,7 +21,8 @@ int main() { #ifdef TRY_GNU #if (defined __GNUC__) && (!defined(__INTEL_COMPILER)) \ && (!defined(__INTEL_LLVM_COMPILER)) && (!defined(__clang_major__)) -#pragma message(STRINGIFY(__GNUC__) "." STRINGIFY(__GNUC_MINOR__)) +#pragma message("host compiler version: " STRINGIFY(__GNUC__) "." STRINGIFY( \ + __GNUC_MINOR__)) return 0; #else breaks_on_purpose