Skip to content
Snippets Groups Projects
Commit f92e11fc authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Configurable CUDA_HOST_COMPILER in cmake

parent f87e4563
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,14 @@ if( WITH_CUDA STREQUAL "yes" )
set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF)
set(BUILD_SHARED_LIBS ON)
set(CUDA_SEPARABLE_COMPILATION ON)
# Use the CUDA_HOST_COMPILER environment variable if the user specified it.
if( NOT $ENV{CUDA_HOST_COMPILER} STREQUAL "" )
message( "-- Setting CUDA_HOST_COMPILER to '$ENV{CUDA_HOST_COMPILER}'" )
set( CUDA_HOST_COMPILER $ENV{CUDA_HOST_COMPILER} )
else()
message( "-- Setting CUDA_HOST_COMPILER to '${CMAKE_CXX_COMPILER}'" )
set( CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} )
endif()
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ;-DHAVE_CUDA)
# disable false compiler warnings
# reference for the -Xcudafe flag: http://stackoverflow.com/questions/14831051/how-to-disable-compiler-warnings-with-nvcc/17095910#17095910
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment