Commit 7749607e authored by Michael Kuron's avatar Michael Kuron
Browse files

Explicitly fall back to C++14 with older CUDA

parent 18b704a2
Pipeline #30471 passed with stages
in 358 minutes and 45 seconds
......@@ -495,8 +495,9 @@ else()
endif()
endif()
if (WALBERLA_BUILD_WITH_CUDA AND CUDA_VERSION VERSION_LESS "11.0")
if (WALBERLA_BUILD_WITH_CUDA AND (CUDA_VERSION VERSION_LESS "11.0" OR CMAKE_VERSION VERSION_LESS 3.18.0))
# CUDA < 11 does not support C++17. std::experimental::any works with C++14, unlike std::any.
set(CMAKE_CUDA_STANDARD 14)
set(WALBERLA_USE_STD_EXPERIMENTAL_ANY 1)
endif()
......@@ -1051,7 +1052,6 @@ if ( WALBERLA_BUILD_WITH_CUDA )
#CUDA_FOUND is need for our cmake mechanism
set ( CUDA_FOUND TRUE )
set(CMAKE_CUDA_STANDARD_REQUIRED OFF)
else()
set ( WALBERLA_BUILD_WITH_CUDA FALSE )
endif ( )
......
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