Make sure we use c++14 when using CUDA 11+

This commit is contained in:
Robert Maynard 2020-08-13 09:25:27 -04:00
parent 64efa64015
commit 7692485831

@ -132,6 +132,12 @@ if(VTKm_ENABLE_CUDA)
INTERFACE_COMPILE_OPTIONS $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>
)
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND
CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
# CUDA 11+ deprecated C++11 support
target_compile_features(vtkm_cuda INTERFACE cxx_std_14)
endif()
# add the -gencode flags so that all cuda code
# way compiled properly