From 5ffc9e6c7e47726f8ca8bc7aab12d0f164c9793d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 25 Mar 2025 10:26:27 -0400 Subject: NVCC: Avoid requiring NVIDIA trademark to identify the compiler Fixes: #26805 --- Modules/CMakeDetermineCUDACompiler.cmake | 2 +- Modules/CMakeDetermineHIPCompiler.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake index 5198231..1cb91f0 100644 --- a/Modules/CMakeDetermineCUDACompiler.cmake +++ b/Modules/CMakeDetermineCUDACompiler.cmake @@ -70,7 +70,7 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN) # We determine the vendor to help with find the toolkit and use the right flags for detection right away. # The main compiler identification is still needed below to extract other information. list(APPEND CMAKE_CUDA_COMPILER_ID_VENDORS NVIDIA Clang) - set(CMAKE_CUDA_COMPILER_ID_VENDOR_REGEX_NVIDIA "nvcc: NVIDIA \\(R\\) Cuda compiler driver") + set(CMAKE_CUDA_COMPILER_ID_VENDOR_REGEX_NVIDIA "nvcc: [^\n]+ Cuda compiler driver") set(CMAKE_CUDA_COMPILER_ID_VENDOR_REGEX_Clang "(clang version)") CMAKE_DETERMINE_COMPILER_ID_VENDOR(CUDA "--version") diff --git a/Modules/CMakeDetermineHIPCompiler.cmake b/Modules/CMakeDetermineHIPCompiler.cmake index 041302a..c03fce8 100644 --- a/Modules/CMakeDetermineHIPCompiler.cmake +++ b/Modules/CMakeDetermineHIPCompiler.cmake @@ -90,7 +90,7 @@ if(NOT CMAKE_HIP_COMPILER_ID_RUN) # We determine the vendor to use the right flags for detection right away. # The main compiler identification is still needed below to extract other information. list(APPEND CMAKE_HIP_COMPILER_ID_VENDORS NVIDIA Clang) - set(CMAKE_HIP_COMPILER_ID_VENDOR_REGEX_NVIDIA "nvcc: NVIDIA \\(R\\) Cuda compiler driver") + set(CMAKE_HIP_COMPILER_ID_VENDOR_REGEX_NVIDIA "nvcc: [^\n]+ Cuda compiler driver") set(CMAKE_HIP_COMPILER_ID_VENDOR_REGEX_Clang "(clang version)") CMAKE_DETERMINE_COMPILER_ID_VENDOR(HIP "--version") -- cgit v0.12