Skip to content

Commit

Permalink
Merge pull request LLNL#193 from LLNL/bugfix/cuda_ccbin
Browse files Browse the repository at this point in the history
added CMAKE_CUDA_HOST_COMPILER to SetupCUDA.cmake
  • Loading branch information
rrsettgast authored Oct 16, 2018
2 parents ae116c7 + 3695393 commit 88e4558
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/thirdparty/SetupCUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,22 @@
################################
set (CMAKE_MODULE_PATH "${BLT_ROOT_DIR}/cmake/thirdparty;${CMAKE_MODULE_PATH}")


if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.9.0" )
if ( NOT CMAKE_CUDA_HOST_COMPILER )
if ( CMAKE_CXX_COMPILER )
set ( CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE STRING "" FORCE)
else ()
set ( CMAKE_CUDA_HOST_COMPILER ${CMAKE_C_COMPILER} CACHE STRING "" FORCE)
endif ()
endif ()
message(STATUS "CMAKE_CUDA_HOST_COMPILER: ${CMAKE_CUDA_HOST_COMPILER}")
endif ()


enable_language(CUDA)


############################################################
# Map Legacy FindCUDA variables to native cmake variables
############################################################
Expand Down

0 comments on commit 88e4558

Please sign in to comment.