Skip to content
Snippets Groups Projects
Commit 7749607e authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Explicitly fall back to C++14 with older CUDA

parent 18b704a2
Branches
No related merge requests found
...@@ -495,8 +495,9 @@ else() ...@@ -495,8 +495,9 @@ else()
endif() endif()
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. # 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) set(WALBERLA_USE_STD_EXPERIMENTAL_ANY 1)
endif() endif()
...@@ -1051,7 +1052,6 @@ if ( WALBERLA_BUILD_WITH_CUDA ) ...@@ -1051,7 +1052,6 @@ if ( WALBERLA_BUILD_WITH_CUDA )
#CUDA_FOUND is need for our cmake mechanism #CUDA_FOUND is need for our cmake mechanism
set ( CUDA_FOUND TRUE ) set ( CUDA_FOUND TRUE )
set(CMAKE_CUDA_STANDARD_REQUIRED OFF)
else() else()
set ( WALBERLA_BUILD_WITH_CUDA FALSE ) set ( WALBERLA_BUILD_WITH_CUDA FALSE )
endif ( ) endif ( )
......
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