diff --git a/CMakeLists.txt b/CMakeLists.txt index a43d265b1bd710909f924694e2182cd134cad8d9..338d86cab72b8b9e16b19a93c537cb4f4c2bf423 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,6 +410,8 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/CMakeModules/morse/") if (CUDA_LIBRARIES) set(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES}; ${CUDA_LIBRARIES}") endif() + + set(CUDA_NEEDED_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/Src) endif() # Find StarPU with a list of optional components diff --git a/Src/CMakeLists.txt b/Src/CMakeLists.txt index bac6f512fca54cc0d430ddc0abdde40f1c4a296f..bc42a5ff7df2020d4c63acdc6a657053b22b6ac3 100755 --- a/Src/CMakeLists.txt +++ b/Src/CMakeLists.txt @@ -32,7 +32,7 @@ if(ScalFMM_USE_CUDA) ADD_CUSTOM_COMMAND(OUTPUT ${_filehpp_output} DEPENDS ${_file} COMMAND echo ARGS Compiling ${_filewe} - COMMAND nvcc ARGS -c ${_file} -o ${_filehpp_output} ${CUSTOM_CUDA_FLAGS}) + COMMAND nvcc ARGS -I${CUDA_NEEDED_INCLUDE_DIRS} -c ${_file} -o ${_filehpp_output} ${CUSTOM_CUDA_FLAGS}) LIST (APPEND SCALFMM_CUDA_SOURCES ${_filehpp_output}) ENDFOREACH ()