diff options
author | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-05-05 16:07:50 +0200 |
---|---|---|
committer | Amir Masoud Abdol <amir.abdol@qt.io> | 2023-05-26 18:48:23 +0200 |
commit | 966e2561162847394d2adea5c74eb85ad1decaaf (patch) | |
tree | 6e51dde415a1bd170baac00ed19016ae01358d31 /cmake/QtFlagHandlingHelpers.cmake | |
parent | fec618b723978f481de30db3e71bb20b9a476c5c (diff) |
Make CONFIGS arguments of qt_internal_remove_compiler_flags optional
There was a discrepancy between what the comment was saying, and what
the function was doing before, and with this patch, we opt for what the
comment was saying, which makes more sense. In addition, I cleaned up
its documentation a bit.
Pick-to: 6.5
Change-Id: I07c20f93aa5c8e9bc942f5e69f0cf8299f4a813e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtFlagHandlingHelpers.cmake')
-rw-r--r-- | cmake/QtFlagHandlingHelpers.cmake | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index 096922b14c..954ab9648d 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -551,12 +551,20 @@ endfunction() # Removes specified flags from CMAKE_<LANGUAGES>_FLAGS[_CONFIGS] variables # -# IN_CACHE enables flags removal from CACHE -# CONFIGS list of configurations that need to clear flags. Clears all configs by default if not -# specified. -# LANGUAGES list of LANGUAGES that need clear flags. Clears all languages by default if not -# specified. -# REGEX enables the flag processing as a regular expression. +# Option Arguments: +# IN_CACHE +# Enables flags removal from CACHE +# REGEX +# Enables the flag processing as a regular expression. +# +# Multi-value Arguments: +# CONFIGS +# List of configurations that need to clear flags. Clears all configs by default if not +# specified. +# +# LANGUAGES +# List of LANGUAGES that need clear flags. Clears all languages by default if not +# specified. function(qt_internal_remove_compiler_flags flags) cmake_parse_arguments(PARSE_ARGV 1 arg "IN_CACHE;REGEX" @@ -579,8 +587,7 @@ function(qt_internal_remove_compiler_flags flags) if(arg_CONFIGS) set(configs "${arg_CONFIGS}") else() - message(FATAL_ERROR - "You must specify at least one configuration for which to remove the flags.") + qt_internal_get_configs_for_flag_manipulation(configs) endif() if(arg_REGEX) |