From: Bruno Turcksin Date: Wed, 9 Sep 2020 17:50:55 +0000 (+0000) Subject: Fix warnings when using cmake 3.18 X-Git-Tag: v9.3.0-rc1~1117^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10856%2Fhead;p=dealii.git Fix warnings when using cmake 3.18 --- diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index e9323ffe48..af42960d37 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -149,6 +149,11 @@ SET(DEAL_II_MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@") SET(DEAL_II_MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@") SET(DEAL_II_MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@") +# +# CUDA specific setup: +# +SET(CMAKE_CUDA_ARCHITECTURES "@CMAKE_CUDA_ARCHITECTURES@") + # # Build a static executable: # diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake index dffca252dc..cf9a69e98e 100644 --- a/cmake/configure/configure_1_cuda.cmake +++ b/cmake/configure/configure_1_cuda.cmake @@ -173,6 +173,13 @@ MACRO(FEATURE_CUDA_CONFIGURE_EXTERNAL) SET(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 0) SET(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 0) + # + # Disable CUDA_ARCHITECTURES target properties + # + IF(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18) + SET(CMAKE_CUDA_ARCHITECTURES OFF) + ENDIF() + # We cannot use -pedantic as compiler flags. nvcc generates code that # produces a lot of warnings when pedantic is enabled. So filter out the # flag: