cmake-utils.eclass: print feature summary
authorChristoph Junghans <ottxor@gentoo.org>
Wed, 24 Aug 2016 23:34:56 +0000 (17:34 -0600)
committerLars Wendler <polynomial-c@gentoo.org>
Thu, 8 Sep 2016 13:12:48 +0000 (15:12 +0200)
Closes: https://github.com/gentoo/gentoo/pull/2139

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
eclass/cmake-utils.eclass

index 393ee28a26ad94659a73fb073c91f39731ad3713..d5292bc980e97e0e87ff0444c1a7f5a58bb3ed01 100644 (file)
@@ -425,6 +425,13 @@ _cmake_modify-cmakelists() {
                Module          \${CMAKE_MODULE_LINKER_FLAGS}
                Shared          \${CMAKE_SHARED_LINKER_FLAGS}\n")
        _EOF_
+
+       if ! grep -Fiq FEATURE_SUMMARY "${CMAKE_USE_DIR}"/CMakeLists.txt; then
+               cat >> "${CMAKE_USE_DIR}"/CMakeLists.txt <<- _EOF_ || die
+                       include(FeatureSummary)
+                       FEATURE_SUMMARY(INCLUDE_QUIET_PACKAGES WHAT ALL)
+               _EOF_
+       fi
 }
 
 # temporary function for moving cmake cleanups from from src_configure -> src_prepare.