diff options
author | Daniele E. Domenichelli <ddomenichelli@drdanz.it> | 2017-02-03 14:32:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-06 19:44:23 (GMT) |
commit | f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7 (patch) | |
tree | 596dbd4ad5906f0ab433e992fc315f64ba39b519 /Tests/RunCMake | |
parent | fddc01bab3352d12c0eba1ff781b359a7dec529c (diff) | |
download | CMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.zip CMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.tar.gz CMake-f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7.tar.bz2 |
FeatureSummary: Add DEFAULT_DESCRIPTION option to feature_summary
If enabled and only one package type is selected, it will print the
default title for the selected package type.
Diffstat (limited to 'Tests/RunCMake')
3 files changed, 129 insertions, 0 deletions
diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription-stdout.txt new file mode 100644 index 0000000..47bdee3 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription-stdout.txt @@ -0,0 +1,46 @@ +-- The following RUNTIME packages have been found: + + \* Foo, The Foo package, <https://foo.example/> + +-- The following OPTIONAL packages have not been found: + + \* Bar + +-- The following REQUIRED packages have not been found: + + \* Baz + +--[ ] + \* Foo, The Foo package, <https://foo.example/> + +--[ ] + \* Bar + +--[ ] + \* Baz + +-- RUNTIME pkgs found + + \* Foo, The Foo package, <https://foo.example/> + +-- OPTIONAL pkgs not found + + \* Bar + +-- REQUIRED pkgs not found + + \* Baz + +-- The following RUNTIME packages have been found: + + \* Foo, The Foo package, <https://foo.example/> + +-- The following OPTIONAL packages have not been found: + + \* Bar + +-- The following REQUIRED packages have not been found: + + \* Baz + +-- Configuring done diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake new file mode 100644 index 0000000..536fe72 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake @@ -0,0 +1,82 @@ +include(FeatureSummary) + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +find_package(Foo) +find_package(Bar) +find_package(Baz) + +set_package_properties(Foo PROPERTIES TYPE RUNTIME) +set_package_properties(Bar PROPERTIES TYPE OPTIONAL) +set_package_properties(Baz PROPERTIES TYPE REQUIRED) + +feature_summary(WHAT ALL) + +feature_summary(WHAT RUNTIME_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT OPTIONAL_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT REQUIRED_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) +feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY) + +feature_summary(WHAT RUNTIME_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "RUNTIME pkgs found\n") +feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "RUNTIME pkgs not found\n") +feature_summary(WHAT OPTIONAL_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "OPTIONAL pkgs found\n") +feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "OPTIONAL pkgs not found\n") +feature_summary(WHAT REQUIRED_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "REQUIRED pkgs found\n") +feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DESCRIPTION "REQUIRED pkgs not found\n") + +feature_summary(WHAT RUNTIME_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT RUNTIME_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT OPTIONAL_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT OPTIONAL_PACKAGES_NOT_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT REQUIRED_PACKAGES_FOUND + INCLUDE_QUIET_PACKAGES + QUIET_ON_EMPTY + DEFAULT_DESCRIPTION) +feature_summary(WHAT REQUIRED_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 9caee4c..8486487 100644 --- a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake +++ b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake @@ -14,6 +14,7 @@ run_cmake(FeatureSummaryFatalOnMissingRequiredPackages) run_cmake(FeatureSummaryIncludeQuietPackages) run_cmake(FeatureSummaryQuietOnEmpty) run_cmake(FeatureSummaryMultipleDepends) +run_cmake(FeatureSummaryDefaultDescription) run_cmake(FeatureSummaryCustomTypes) run_cmake(FeatureSummaryCustomBadDefault) run_cmake(FeatureSummaryCustomRequired) |