CForgeTargetAddWarnings¶
Add warnings from a config file to a CMake target.
- cforge_target_add_warnings¶
cforge_target_add_warnings(<target-name> [CONFIG_FILE <config-file>] [WARNING_AS_ERROR] )
If the CONFIG_FILE
argument is not specified, the default config file
cmake/Modules/CForgeTargetAddWarnings/default-warnings.cmake will be used. This default config file
provides a reasonable set of warnings for GCC, Clang and MSVC that may be enabled in all projects.
The WARNING_AS_ERROR
optional argument turns warnings into errors.
It may not be implemented for all compilers. Checkout the
CMake documentation
for more informations.