]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove optimization flags from Trilinos flags
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 17 Nov 2022 04:55:41 +0000 (04:55 +0000)
committerDaniel Arndt <arndtd@ornl.gov>
Sat, 19 Nov 2022 00:57:09 +0000 (18:57 -0600)
cmake/modules/FindTRILINOS.cmake

index c5e29605881eb44e853a7fee20bcd53fde4e6d90..263ce6d15313c1ee2c110548d63d0f1d11d21cbe 100644 (file)
@@ -128,6 +128,12 @@ STRING(REGEX REPLACE
 
 REMOVE_DUPLICATES(Trilinos_TPL_INCLUDE_DIRS)
 
+#
+# Remove optimization flags like -03 and -DNDEBUG, we handle those elsewhere.
+#
+STRING(REGEX REPLACE "-O[^ ]*" "" TRILINOS_CXX_FLAGS_SANITIZED "${Trilinos_CXX_COMPILER_FLAGS}")
+STRING(REGEX REPLACE "-DNDEBUG" "" TRILINOS_CXX_FLAGS_SANITIZED "${TRILINOS_CXX_FLAGS_SANITIZED}")
+
 #
 # We'd like to have the full library names but the Trilinos package only
 # exports a list with short names...
@@ -160,7 +166,7 @@ DEAL_II_PACKAGE_HANDLE(TRILINOS
     REQUIRED Trilinos_INCLUDE_DIRS
     OPTIONAL Trilinos_TPL_INCLUDE_DIRS
   CXX_FLAGS
-    OPTIONAL Trilinos_CXX_COMPILER_FLAGS
+    OPTIONAL TRILINOS_CXX_FLAGS_SANITIZED
   LINKER_FLAGS
     OPTIONAL Trilinos_EXTRA_LD_FLAGS
   CLEAR

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.