Compilation flags

default_warnings

This module defines functions to help define standardized compiler warning and error messages.

set_default_warnings() enables compiler warning and error messages.

set_default_warnings

Automatically set compiler warning and error messages for target.

set_default_warnings(TARGET target)

The option is:

TARGET target

Specifies target, which must be a known CMake library or executable target.

Usage example:


include(default_warnings)

add_library(FooLib FooLib.cc) set_default_warnings(TARGET FooLib)

add_executable(FooExe FooExe.cc) set_default_warnings(TARGET FooExe)

add_executable(FooTest FooTest.cc)