mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 11:08:03 +02:00
cmake: in macro generate_compiler_warning_flags prevent duplicates in variable containing unsupported warnings
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
This commit is contained in:
parent
fb5449e08f
commit
f075650634
1 changed files with 4 additions and 3 deletions
|
|
@ -157,6 +157,7 @@ macro(generate_compiler_warning_flags)
|
|||
unset(USED)
|
||||
unset(USED_WARNINGS)
|
||||
unset(USED_DISABLED)
|
||||
unset(USED_UNSUPPORTED)
|
||||
|
||||
if(MSVC)
|
||||
# level 1 is default
|
||||
|
|
@ -175,7 +176,7 @@ macro(generate_compiler_warning_flags)
|
|||
if(_flag_supported)
|
||||
set(temp "${temp} ${error_prefix}${warning}")
|
||||
list(APPEND USED ${warning})
|
||||
else()
|
||||
elseif(NOT warning IN_LIST USED_UNSUPPORTED)
|
||||
list(APPEND USED_UNSUPPORTED ${warning})
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
@ -191,7 +192,7 @@ macro(generate_compiler_warning_flags)
|
|||
set(temp "${temp} ${enabled_prefix}${warning}")
|
||||
list(APPEND USED_WARNINGS ${warning})
|
||||
list(APPEND USED ${warning})
|
||||
else()
|
||||
elseif(NOT warning IN_LIST USED_UNSUPPORTED)
|
||||
list(APPEND USED_UNSUPPORTED ${warning})
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -208,7 +209,7 @@ macro(generate_compiler_warning_flags)
|
|||
set(temp "${temp} ${disabled_prefix}${warning}")
|
||||
list(APPEND USED_DISABLED ${warning})
|
||||
list(APPEND USED ${warning})
|
||||
else()
|
||||
elseif(NOT warning IN_LIST USED_UNSUPPORTED)
|
||||
list(APPEND USED_UNSUPPORTED ${warning})
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue