diff --git a/cmake/CompilerOptions.cmake b/cmake/CompilerOptions.cmake index dc51e5475..cb5f3406b 100644 --- a/cmake/CompilerOptions.cmake +++ b/cmake/CompilerOptions.cmake @@ -50,6 +50,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # fatal error: recursive template instantiation exceeded maximum depth of 256 # ecbuild_add_cxx_flags("-ftemplate-depth=1024") + + # + # In case of using Clang 18.1+ in Linux, we disable the following error (present in Boost headers): + # + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18.1 AND CMAKE_SYSTEM_NAME STREQUAL "Linux") + ecbuild_add_cxx_flags("-Wno-enum-constexpr-conversion") + endif () endif() if (HAVE_WARNINGS)