Commit 10a8194f authored by incardon's avatar incardon

Fixing for CUDA 10

parent 73be827c
...@@ -25,6 +25,17 @@ set(HDF5_PREFER_PARALLEL TRUE) ...@@ -25,6 +25,17 @@ set(HDF5_PREFER_PARALLEL TRUE)
if(ENABLE_GPU) if(ENABLE_GPU)
enable_language(CUDA) enable_language(CUDA)
find_package(CUDA) find_package(CUDA)
if (CUDA_VERSION_MAJOR EQUAL 9 AND CUDA_VERSION_MINOR EQUAL 2)
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda)
elseif ( CUDA_VERSION_MAJOR EQUAL 10 AND CUDA_VERSION_MINOR EQUAL 1 )
message("CUDA is compatible")
set(WARNING_SUPPRESSION_AND_OPTION_NVCC -Xcudafe "--display_error_number --diag_suppress=2915 --diag_suppress=2912 --diag_suppress=2913 --diag_suppress=111 --diag_suppress=186 --diag_suppress=611 " --expt-extended-lambda)
else()
message(FATAL_ERROR "CUDA is incompatible, version 9.2 is only supported")
endif()
endif() endif()
find_package(Boost 1.66.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options) find_package(Boost 1.66.0 REQUIRED COMPONENTS unit_test_framework iostreams program_options)
......
...@@ -22,7 +22,7 @@ endif() ...@@ -22,7 +22,7 @@ endif()
########################### ###########################
if (CUDA_FOUND) if (CUDA_FOUND)
target_compile_options(io PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda>) target_compile_options(io PUBLIC $<$<COMPILE_LANGUAGE:CUDA>: ${WARNING_SUPPRESSION_AND_OPTION_NVCC} >)
target_include_directories (io PUBLIC ${MPI_C_INCLUDE_DIRS}) target_include_directories (io PUBLIC ${MPI_C_INCLUDE_DIRS})
if (TEST_COVERAGE) if (TEST_COVERAGE)
target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage">) target_compile_options(io PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage">)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment