diff options
author | Daniele E. Domenichelli <ddomenichelli@drdanz.it> | 2017-02-03 14:42:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-06 19:44:24 (GMT) |
commit | 6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523 (patch) | |
tree | 6deee3a8e893623fdf867434d880d1431781fde3 /Tests/RunCMake/FeatureSummary | |
parent | f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7 (diff) | |
download | CMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.zip CMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.tar.gz CMake-6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523.tar.bz2 |
FeatureSummary: Add FeatureSummary_<TYPE>_DESCRIPTION global properties
The global property FeatureSummary_<TYPE>_DESCRIPTION can be defined for
each type to replace the type name with the specified string whenever
the package type is used in an output string.
Diffstat (limited to 'Tests/RunCMake/FeatureSummary')
3 files changed, 250 insertions, 0 deletions
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription-stdout.txt new file mode 100644 index 0000000..723c467 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription-stdout.txt @@ -0,0 +1,91 @@ +-- The following TYPE1 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 not been found: + + \* Baz + +--[ ] + \* Foo, The Foo package, <https://foo.example/> + +--[ ] + \* Bar + +--[ ] + \* Baz + +-- TYPE1 pkgs found + + \* Foo, The Foo package, <https://foo.example/> + +-- TYPE2 pkgs not found + + \* Bar + +-- TYPE3 pkgs not found + + \* Baz + +-- The following TYPE1 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 not been found: + + \* Baz + +-- The following first type packages have been found: + + \* Foo, The Foo package, <https://foo.example/> + +-- The following second type packages have not been found: + + \* Bar + +-- The following third type packages have not been found: + + \* Baz + +--[ ] + \* Foo, The Foo package, <https://foo.example/> + +--[ ] + \* Bar + +--[ ] + \* Baz + +-- TYPE1 pkgs found + + \* Foo, The Foo package, <https://foo.example/> + +-- TYPE2 pkgs not found + + \* Bar + +-- TYPE3 pkgs not found + + \* Baz + +-- The following first type packages have been found: + + \* Foo, The Foo package, <https://foo.example/> + +-- The following second type packages have not been found: + + \* Bar + +-- The following third type packages have not been found: + + \* Baz + +-- Configuring done diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription.cmake new file mode 100644 index 0000000..e61b652 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription.cmake @@ -0,0 +1,158 @@ +include(FeatureSummary) +set_property(GLOBAL PROPERTY FeatureSummary_PKG_TYPES TYPE1 TYPE2 TYPE3) + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +find_package(Foo) +find_package(Bar) +find_package(Baz) + +set_package_properties(Foo PROPERTIES TYPE TYPE1) +set_package_properties(Bar PROPERTIES TYPE TYPE2) +set_package_properties(Baz PROPERTIES TYPE TYPE3) + +feature_summary(WHAT ALL) + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE1 pkgs found\n") +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE1 pkgs not found\n") +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE2 pkgs found\n") +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE2 pkgs not found\n") +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE3 pkgs found\n") +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE3 pkgs not found\n") + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) + +set_property(GLOBAL PROPERTY FeatureSummary_TYPE1_DESCRIPTION "first type packages") +set_property(GLOBAL PROPERTY FeatureSummary_TYPE2_DESCRIPTION "second type packages") +set_property(GLOBAL PROPERTY FeatureSummary_TYPE3_DESCRIPTION "third type packages") + +feature_summary(WHAT ALL) + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE1 pkgs found\n") +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE1 pkgs not found\n") +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE2 pkgs found\n") +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE2 pkgs not found\n") +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE3 pkgs found\n") +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "TYPE3 pkgs not found\n") + +feature_summary(WHAT TYPE1_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE1_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE2_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE2_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE3_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT TYPE3_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) diff --git a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake index 8486487..c672c16 100644 --- a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake +++ b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake @@ -20,3 +20,4 @@ run_cmake(FeatureSummaryCustomBadDefault) run_cmake(FeatureSummaryCustomRequired) run_cmake(FeatureSummaryCustomRequiredListA) run_cmake(FeatureSummaryCustomRequiredListB) +run_cmake(FeatureSummaryCustomDescription) |