From a72402a744944654ecaec38de81dd74ac69b63f3 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 9 Sep 2020 17:50:55 +0000 Subject: [PATCH] Fix warnings when using cmake 3.18 --- cmake/config/Config.cmake.in | 5 +++++ cmake/configure/configure_1_cuda.cmake | 7 +++++++ 2 files changed, 12 insertions(+) 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: -- 2.39.5