From 1bcf501d4975338041a7193b33e87a522531ecef Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Fri, 5 Jan 2018 11:45:04 -0500 Subject: [PATCH] Do not use pedantic when cuda support is enabled nvcc generates code that produces a lot of warnings when pedantic is used. Since the code is generated by nvcc there is nothing we can do about it except not using pedantic. --- cmake/configure/configure_1_cuda.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake index 15e4ae9992..fe90e14c72 100644 --- a/cmake/configure/configure_1_cuda.cmake +++ b/cmake/configure/configure_1_cuda.cmake @@ -115,6 +115,12 @@ MACRO(FEATURE_CUDA_CONFIGURE_EXTERNAL) # ADD_FLAGS(DEAL_II_CUDA_FLAGS "${DEAL_II_CXX_VERSION_FLAG}") + # 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: + # + STRING(REPLACE "-pedantic" "" DEAL_II_CXX_FLAGS "${DEAL_II_CXX_FLAGS}") + # # Export definitions: # -- 2.39.5