Skip to content

Commit

Permalink
added commands to set CMAKE_CUDA_HOST_COMPILER in SetupCUDA.cmake file
Browse files Browse the repository at this point in the history
  • Loading branch information
rrsettgast committed Oct 15, 2018
1 parent ae116c7 commit 7ca3487
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmake/thirdparty/SetupCUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,19 @@
################################
set (CMAKE_MODULE_PATH "${BLT_ROOT_DIR}/cmake/thirdparty;${CMAKE_MODULE_PATH}")


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 BOOL "" FORCE)
endif ()
endif ()


enable_language(CUDA)


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

0 comments on commit 7ca3487

Please sign in to comment.