]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't define _LIBCPP_ENABLE_ASSERTIONS for clang++-19 and later 17765/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 10 Oct 2024 17:01:25 +0000 (13:01 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 11 Oct 2024 13:05:18 +0000 (09:05 -0400)
cmake/setup_compiler_flags_gnu.cmake

index a352c9839295f0dd42855a5635667ee0125b04cf..d2168e200227f66c9adef57338c7de3936b971e6 100644 (file)
@@ -192,7 +192,11 @@ if (CMAKE_BUILD_TYPE MATCHES "Debug")
   # Enable invalid element access and other checks in the c++ standard libray:
   list(APPEND DEAL_II_DEFINITIONS_DEBUG "_GLIBCXX_ASSERTIONS")
   if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    list(APPEND DEAL_II_DEFINITIONS_DEBUG "_LIBCPP_ENABLE_ASSERTIONS")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
+      # _LIBCPP_ENABLE_ASSERTIONS was deprecated in clang++-19
+      # _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE should be used instead
+      list(APPEND DEAL_II_DEFINITIONS_DEBUG "_LIBCPP_ENABLE_ASSERTIONS")
+    endif()
     list(APPEND DEAL_II_DEFINITIONS_DEBUG "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE")
   endif()
 

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.