diff --git a/cmake/GinkgoConfig.cmake.in b/cmake/GinkgoConfig.cmake.in index ea251a64b86..fe2ac05d7e5 100644 --- a/cmake/GinkgoConfig.cmake.in +++ b/cmake/GinkgoConfig.cmake.in @@ -217,7 +217,7 @@ endif() function(_ginkgo_check_compiler lang) if(NOT ${CMAKE_${lang}_COMPILER} STREQUAL ${GINKGO_${lang}_COMPILER}) set(_compiler_short "${CMAKE_${lang}_COMPILER_ID}:${CMAKE_${lang}_COMPILER_VERSION}") - if(NOT _compiler_short STREQUAL ${GINKGO_${lang}_COMPILER_SHORT}) + if(NOT _compiler_short STREQUAL "${GINKGO_${lang}_COMPILER_SHORT}") message(WARNING "The currently used ${lang} compiler: ${CMAKE_${lang}_COMPILER} does not match the compiler used to " "build Ginkgo: ${GINKGO_${lang}_COMPILER}. It is encouraged to use the same compiler as Ginkgo to prevent ABI mismatch.") endif() @@ -226,6 +226,7 @@ endfunction() _ginkgo_check_compiler(CXX) if(GINKGO_BUILD_CUDA) _ginkgo_check_compiler(CUDA) + _ginkgo_check_compiler(CUDA_HOST) endif() include(${CMAKE_CURRENT_LIST_DIR}/GinkgoTargets.cmake)