Skip to content

Commit

Permalink
Merge pull request #2577 from atrantan/master
Browse files Browse the repository at this point in the history
Retrieve -std=c++11 consistent nvcc flag
  • Loading branch information
hkaiser committed Apr 4, 2017
2 parents 60881cd + d54fbc5 commit 7cfae9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ if(HPX_WITH_CUDA AND NOT HPX_WITH_CUDA_CLANG)
string(REPLACE "sm_" "" arch ${arch})
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_${arch},code=sm_${arch})
endforeach()
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};${CXX_FLAG})
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_30,code=sm_30)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_35,code=sm_35)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode=arch=compute_30,code=compute_30)
Expand Down
2 changes: 1 addition & 1 deletion cmake/templates/HPXConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ set(HPX_CUDA_CLANG_FLAGS @HPX_CUDA_CLANG_FLAGS@)
if(HPX_WITH_CUDA AND NOT HPX_WITH_CUDA_CLANG)
find_package(CUDA REQUIRED)
set(CUDA_SEPARABLE_COMPILATION ON)
set(CUDA_NVCC_FLAGS @CXX_FLAG@ @CUDA_NVCC_FLAGS@)
set(CUDA_NVCC_FLAGS @CUDA_NVCC_FLAGS@)
cuda_include_directories("@HPX_CMAKE_CONF_INCLUDE_DIRS@")
endif()

0 comments on commit 7cfae9b

Please sign in to comment.