Skip to content

Commit

Permalink
warnings for atlas_io
Browse files Browse the repository at this point in the history
  • Loading branch information
wdeconinck committed Feb 14, 2025
1 parent 205dc54 commit 239f573
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions atlas_io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ ecbuild_add_option( FEATURE ECKIT_CODEC
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

ecbuild_add_option( FEATURE WARNING_AS_ERROR
DEFAULT OFF
DESCRIPTION "Treat compile warning as error" )

if(HAVE_WARNING_AS_ERROR)
ecbuild_add_cxx_flags("-Werror" NO_FAIL NAME atlas_io_cxx_warning_as_error)
endif()

ecbuild_add_option( FEATURE WARNINGS
DEFAULT ON
DESCRIPTION "Add warnings to compiler" )

if(HAVE_WARNINGS)
ecbuild_add_cxx_flags("-Wall" NO_FAIL)
ecbuild_add_cxx_flags("-Wextra" NO_FAIL)
endif()

if( CMAKE_CXX_COMPILER_ID STREQUAL Intel )
ecbuild_add_cxx_flags("-diag-disable=10441" NO_FAIL) # Deprecated classic compiler
endif()

check_cxx_source_compiles( "#include <cxxabi.h>\n int main() { char * type; int status; char * r = abi::__cxa_demangle(type, 0, 0, &status); }"
ATLAS_IO_HAVE_CXXABI_H )

Expand Down

0 comments on commit 239f573

Please sign in to comment.