You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
478 B
14 lines
478 B
2 years ago
|
enable_language(${LANGUAGE})
|
||
|
|
||
|
include(WarningAsErrorOptions.cmake)
|
||
|
get_warning_options(warning_options ${LANGUAGE})
|
||
|
|
||
|
if (DEFINED warning_options)
|
||
|
add_executable(WerrorOn warn.${EXTENSION})
|
||
|
target_compile_options(WerrorOn PUBLIC "${warning_options}")
|
||
|
set_target_properties(WerrorOn PROPERTIES COMPILE_WARNING_AS_ERROR ON)
|
||
|
else()
|
||
|
# if no werror option is set for the environment, use err so that build fails as expected
|
||
|
add_executable(WerrorOn err.${EXTENSION})
|
||
|
endif()
|