opm-simulators/cmake/Modules/UseWarnings.cmake

15 lines
390 B
CMake
Raw Normal View History

2013-05-15 03:24:52 -05:00
# - Turn on warnings when compiling
include (AddOptions)
include (UseCompVer)
is_compiler_gcc_compatible ()
if (CXX_COMPAT_GCC)
2013-05-15 03:24:52 -05:00
# default warnings flags, if not set by user
set_default_option (_warn_flag "-Wall" "(^|\ )-W")
if (_warn_flag)
message (STATUS "All warnings enabled: ${_warn_flag}")
add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}")
endif (_warn_flag)
endif ()