]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Do not use pedantic when cuda support is enabled 5699/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 5 Jan 2018 16:45:04 +0000 (11:45 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Fri, 5 Jan 2018 16:45:39 +0000 (11:45 -0500)
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

index 15e4ae999202db606e5382f49b9f502bec82402e..fe90e14c72bef9f2ee3a220fc959f3b815081d41 100644 (file)
@@ -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:
   #

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.