File: compiler_warnings.cmake

package info (click to toggle)
eckit 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,044 kB
  • sloc: cpp: 111,103; ansic: 2,826; yacc: 590; lex: 361; python: 302; sh: 162; makefile: 53
file content (15 lines) | stat: -rw-r--r-- 487 bytes parent folder | download | duplicates (17)
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()