Skip to content
Snippets Groups Projects
Commit 8df12fc9 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FeatureSummary_enhancement'

560574b0 FeatureSummary: Update release notes
3cfde818 FeatureSummary: Refactor to use global properties for package types
f0165eb6 FeatureSummary: Allow lists of dependencies in ADD_FEATURE_INFO
9da7bf08 FeatureSummary: Add QUIET_ON_EMPTY option to feature_summary
4cf4aceb FeatureSummary: Add unit tests
614a97a5 FeatureSummary: Do not force OPTIONAL type in SET_PACKAGE_PROPERTIES
65a0bfd8 FeatureSummary: Add deprecation warnings to deprecated commands
4da3cae9 FeatureSummary: Clean printed output
parents 5c6c766d 560574b0
No related branches found
No related tags found
No related merge requests found
Showing
with 455 additions and 101 deletions
FeatureSummary_enhancement
--------------------------
* The :command:`set_package_info`, :command:`set_feature_info`,
:command:`print_enabled_features` and :command:`print_disabled_features`
commands from the the :module:`FeatureSummary` module are now deprecated.
* The :command:`set_package_properties` command no longer forces the package
type to ``OPTIONAL`` when the type is not explicitly set.
* The :command:`feature_summary` command in the :module:`FeatureSummary` module
accepts the new ``QUIET_ON_EMPTY`` option that will suppresses the output when
the list of packages that belong to the selected category is empty.
* The :command:`add_feature_info` in the :module:`FeatureSummary` module learned
to accept lists of dependencies for deciding whether a feature is enabled or
not.
* The package types accepted by the the :module:`FeatureSummary` module can now
be tweaked by changing the :variable:`FeatureSummary_PKG_TYPES`,
:variable:`FeatureSummary_REQUIRED_PKG_TYPES` and
:variable:`FeatureSummary_DEFAULT_PKG_TYPE` global properties.
This diff is collapsed.
1
CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\):
Bad package property type OPTIONAL used in global property
FeatureSummary_DEFAULT_PKG_TYPE. Valid types are TYPE1, TYPE2 and TYPE3.
Either update FeatureSummary_DEFAULT_PKG_TYPE or add OPTIONAL to the
FeatureSummary_PKG_TYPES global property.
Call Stack \(most recent call first\):
.*/Modules/FeatureSummary\.cmake:[0-9]+. \(_FS_GET_FEATURE_SUMMARY\)
FeatureSummaryCustomBadDefault.cmake:[0-9]+ \(feature_summary\)
CMakeLists.txt:[0-9]+ \(include\)
include(FeatureSummary)
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
find_package(Foo)
feature_summary(WHAT ALL)
1
CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\):
feature_summary\(\) Error: REQUIRED package\(s\) are missing, aborting CMake
run.
Call Stack \(most recent call first\):
FeatureSummaryCustomRequired.cmake:[0-9]+ \(feature_summary\)
CMakeLists.txt:[0-9]+ \(include\)
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE2 packages have not been found:
\* Bar
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE3 packages have not been found:
\* Bar
-- Configuring incomplete, errors occurred!
include(FeatureSummary)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_REQUIRED_PKG_TYPES TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_DEFAULT_PKG_TYPE TYPE2)
find_package(Foo)
find_package(Bar)
set_package_properties(Foo PROPERTIES TYPE TYPE3)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
set_package_properties(Bar PROPERTIES TYPE TYPE3)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
1
CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\):
feature_summary\(\) Error: REQUIRED package\(s\) are missing, aborting CMake
run.
Call Stack \(most recent call first\):
FeatureSummaryCustomRequiredListA.cmake:[0-9]+ \(feature_summary\)
CMakeLists.txt:[0-9]+ \(include\)
-- The following TYPE2 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE1 packages have not been found:
\* Bar
-- The following TYPE2 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE2 packages have not been found:
\* Bar
-- Configuring incomplete, errors occurred!
include(FeatureSummary)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_REQUIRED_PKG_TYPES TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_DEFAULT_PKG_TYPE TYPE1)
find_package(Foo)
find_package(Bar)
set_package_properties(Foo PROPERTIES TYPE TYPE2)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
set_package_properties(Bar PROPERTIES TYPE TYPE2)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
1
CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\):
feature_summary\(\) Error: REQUIRED package\(s\) are missing, aborting CMake
run.
Call Stack \(most recent call first\):
FeatureSummaryCustomRequiredListB.cmake:[0-9]+ \(feature_summary\)
CMakeLists.txt:[0-9]+ \(include\)
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE1 packages have not been found:
\* Bar
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE3 packages have not been found:
\* Bar
-- Configuring incomplete, errors occurred!
include(FeatureSummary)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_REQUIRED_PKG_TYPES TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_DEFAULT_PKG_TYPE TYPE1)
find_package(Foo)
find_package(Bar)
set_package_properties(Foo PROPERTIES TYPE TYPE3)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
set_package_properties(Bar PROPERTIES TYPE TYPE3)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
-- The following TYPE2 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE1 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE2 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE2 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- The following TYPE3 packages have been found:
\* Foo, The Foo package, <https://foo.example/>
-- Configuring done
include(FeatureSummary)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_REQUIRED_PKG_TYPES TYPE3)
set_property(GLOBAL PROPERTY FeatureSummary_DEFAULT_PKG_TYPE TYPE2)
find_package(Foo)
# Type not set => TYPE2
feature_summary(WHAT ALL)
# TYPE1 > not set => TYPE1
set_package_properties(Foo PROPERTIES TYPE TYPE1)
feature_summary(WHAT ALL)
# TYPE2 > TYPE1 => TYPE2
set_package_properties(Foo PROPERTIES TYPE TYPE2)
feature_summary(WHAT ALL)
# TYPE1 < TYPE2 => TYPE2
set_package_properties(Foo PROPERTIES TYPE TYPE2)
feature_summary(WHAT ALL)
# TYPE3 > TYPE2 => TYPE3
set_package_properties(Foo PROPERTIES TYPE TYPE3)
feature_summary(WHAT ALL)
# TYPE2 < TYPE3 => TYPE3
set_package_properties(Foo PROPERTIES TYPE TYPE2)
feature_summary(WHAT ALL)
# TYPE1 < TYPE3 => TYPE3
set_package_properties(Foo PROPERTIES TYPE TYPE1)
feature_summary(WHAT ALL)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment