mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-30 04:50:11 +01:00
cmake: Fix not detecting unsupported g++ related warning checks
Unsupported warnings are detected by cmake through errors during compilation, which causes g++ not to detect them, since they are only output as warnings. Setting -Werror ensures this. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
parent
4b73505869
commit
bbd3f90a8d
1 changed files with 2 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ include(CheckCCompilerFlag)
|
|||
include(CheckCXXCompilerFlag)
|
||||
function(check_compiler_warning_flag _flag _result _cxx)
|
||||
string(MAKE_C_IDENTIFIER "${_flag}" _varname)
|
||||
# required to get errors
|
||||
list(APPEND _flag -Werror)
|
||||
if (_cxx)
|
||||
check_cxx_compiler_flag("${_flag}" HAVE_CXX_FLAG${_varname})
|
||||
set(${_result} ${HAVE_CXX_FLAG${_varname}} PARENT_SCOPE)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue