Skip to content

Commit

Permalink
also check cuda host compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Aug 1, 2023
1 parent 6e52c9d commit 286c106
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/GinkgoConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)

0 comments on commit 286c106

Please sign in to comment.