summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-03-20 17:36:25 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-03-21 10:29:38 +0000
commita9c379199da684c3a88af2898fe8384f0c70986c (patch)
treed7002939f5eaf9f2a5a60cbdcd0e3c675cdb51d9 /cmake
parent432f7232e3b1a4b2668e31e1ccfdd4d404b49960 (diff)
Fix internal features to also be evaluated
This amends 4f1a155909dfcba7353ebe9eee669d65336bd943 and 37b154858f41c0aa32ad124878fae96c39563d39 which caused the regeneration of some json features to be internal. Some of those features were not evaluated any more unless they were referenced in another feature. Make sure to explicitly evaluate all internal features as well. Change-Id: I4367f309585fe29dc89d8a6b793de381956ae51d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtFeature.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/cmake/QtFeature.cmake b/cmake/QtFeature.cmake
index 38ff328de4..2166ac69ff 100644
--- a/cmake/QtFeature.cmake
+++ b/cmake/QtFeature.cmake
@@ -13,8 +13,9 @@ function(qt_feature_module_begin)
endif()
set(__QtFeature_library "${arg_LIBRARY}" PARENT_SCOPE)
- set(__QtFeature_private_features "" PARENT_SCOPE)
set(__QtFeature_public_features "" PARENT_SCOPE)
+ set(__QtFeature_private_features "" PARENT_SCOPE)
+ set(__QtFeature_internal_features "" PARENT_SCOPE)
set(__QtFeature_private_file "${arg_PRIVATE_FILE}" PARENT_SCOPE)
set(__QtFeature_public_file "${arg_PUBLIC_FILE}" PARENT_SCOPE)
@@ -39,9 +40,14 @@ function(qt_feature feature)
if (arg_PRIVATE)
list(APPEND __QtFeature_private_features "${feature}")
endif()
+ if (NOT arg_PUBLIC AND NOT arg_PRIVATE)
+ list(APPEND __QtFeature_internal_features "${feature}")
+ endif()
+
set(__QtFeature_public_features ${__QtFeature_public_features} PARENT_SCOPE)
set(__QtFeature_private_features ${__QtFeature_private_features} PARENT_SCOPE)
+ set(__QtFeature_internal_features ${__QtFeature_internal_features} PARENT_SCOPE)
endfunction()
function(qt_evaluate_to_boolean expressionVar)
@@ -332,7 +338,7 @@ function(qt_internal_feature_write_file file features extra)
endfunction()
function(qt_feature_module_end target)
- set(all_features ${__QtFeature_public_features} ${__QtFeature_private_features})
+ set(all_features ${__QtFeature_public_features} ${__QtFeature_private_features} ${__QtFeature_internal_features})
list(REMOVE_DUPLICATES all_features)
foreach(feature ${all_features})
@@ -398,8 +404,9 @@ function(qt_feature_module_end target)
endif()
unset(__QtFeature_library PARENT_SCOPE)
- unset(__QtFeature_private_features PARENT_SCOPE)
unset(__QtFeature_public_features PARENT_SCOPE)
+ unset(__QtFeature_private_features PARENT_SCOPE)
+ unset(__QtFeature_internal_features PARENT_SCOPE)
unset(__QtFeature_private_file PARENT_SCOPE)
unset(__QtFeature_public_file PARENT_SCOPE)