CMake: allow user specified boolean values to have any case
When running something like this: cmake -D FEATURE_xkbcommon=On qtbase one would run into issues like: CMake Error at cmake/QtFeature.cmake:254 (message): Sanity check failed: FEATURE_xkbcommon has invalid value "On"! Call Stack (most recent call first): cmake/QtFeature.cmake:396 (qt_feature_check_and_save_user_provided_value) cmake/QtFeature.cmake:606 (qt_evaluate_feature) cmake/QtFeature.cmake:575 (qt_feature_module_end) src/CMakeLists.txt:12 (qt_feature_evaluate_features) Change-Id: I33a921625b97aeb3c423cb7c1fb1bd3b05ce24a7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 60829b0b257e62056aa32a7e58863b2c30bbdc89)
This commit is contained in:
parent
6b3f71521b
commit
9adc7c3a42
@ -236,7 +236,7 @@ function(qt_feature_check_and_save_user_provided_value resultVar feature conditi
|
||||
if (DEFINED "FEATURE_${feature}")
|
||||
# Revisit new user provided value
|
||||
set(user_value "${FEATURE_${feature}}")
|
||||
set(result "${user_value}")
|
||||
string(TOUPPER "${user_value}" result)
|
||||
|
||||
# If the build is marked as dirty and the user_value doesn't meet the new condition,
|
||||
# reset it to the computed one.
|
||||
|
Loading…
x
Reference in New Issue
Block a user