From: Daniel Arndt Date: Thu, 17 Nov 2022 04:55:41 +0000 (+0000) Subject: Remove optimization flags from Trilinos flags X-Git-Tag: v9.5.0-rc1~828^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56b76aab08af199f7d6e28b447ac7f0db04482d4;p=dealii.git Remove optimization flags from Trilinos flags --- diff --git a/cmake/modules/FindTRILINOS.cmake b/cmake/modules/FindTRILINOS.cmake index c5e2960588..263ce6d153 100644 --- a/cmake/modules/FindTRILINOS.cmake +++ b/cmake/modules/FindTRILINOS.cmake @@ -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