File: compiler_warnings.cmake

package info (click to toggle)
fdb 5.9.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 67,572 kB
  • sloc: cpp: 24,147; sh: 1,315; python: 141; makefile: 25; ansic: 8
file content (15 lines) | stat: -rw-r--r-- 487 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ecbuild_add_option( FEATURE WARNINGS
                    DEFAULT ON
                    DESCRIPTION "Add warnings to compiler" )

# activate warnings, ecbuild macros check the compiler recognises the options
if(HAVE_WARNINGS)

  ecbuild_add_cxx_flags("-Wall" NO_FAIL)
  ecbuild_add_cxx_flags("-Wextra" NO_FAIL)

  ecbuild_add_cxx_flags("-Wno-unused-parameter" NO_FAIL)
  ecbuild_add_cxx_flags("-Wno-unused-variable" NO_FAIL)
  ecbuild_add_cxx_flags("-Wno-sign-compare" NO_FAIL)

endif()