CMake: factor out explanation of skipped modules.
Make a function out of explaining-skipped-modules, and call it not only after collecting all the modules, but also after the feature summary, so that it's quite clear which modules are skipped.
This commit is contained in:
parent
58252fc16d
commit
6e01bb0fa4
@ -119,6 +119,7 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
||||
endif()
|
||||
|
||||
include( FeatureSummary )
|
||||
include( CMakeColors )
|
||||
|
||||
set( QT_VERSION 5.6.0 )
|
||||
|
||||
@ -313,6 +314,12 @@ add_feature_info(KCrash ${WITH_KF5Crash} "Crash dumps via KCrash")
|
||||
|
||||
feature_summary(WHAT ALL)
|
||||
|
||||
get_directory_property( SKIPPED_MODULES
|
||||
DIRECTORY src/modules
|
||||
DEFINITION LIST_SKIPPED_MODULES
|
||||
)
|
||||
calamares_explain_skipped_modules( ${SKIPPED_MODULES} )
|
||||
|
||||
# Add all targets to the build-tree export set
|
||||
set( CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/Calamares" CACHE PATH "Installation directory for CMake files" )
|
||||
set( CMAKE_INSTALL_FULL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_CMAKEDIR}" )
|
||||
|
@ -1,4 +1,3 @@
|
||||
include( CMakeColors )
|
||||
include( CalamaresAddTranslations )
|
||||
|
||||
set( MODULE_DATA_DESTINATION share/calamares/modules )
|
||||
@ -9,6 +8,16 @@ macro( calamares_skip_module )
|
||||
set( SKIPPED_MODULES ${SKIPPED_MODULES} ${ARGV} PARENT_SCOPE )
|
||||
endmacro()
|
||||
|
||||
function( calamares_explain_skipped_modules )
|
||||
if ( ARGN )
|
||||
message( "${ColorReset}-- Skipped modules:" )
|
||||
foreach( SUBDIRECTORY ${ARGN} )
|
||||
message( "${ColorReset}-- Skipped ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
|
||||
endforeach()
|
||||
message( "" )
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function( calamares_add_module_subdirectory )
|
||||
set( SUBDIRECTORY ${ARGV0} )
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
include( CMakeColors )
|
||||
|
||||
# The variable SKIP_MODULES can be set to skip particular modules;
|
||||
# individual modules can also decide they must be skipped (e.g. OS-specific
|
||||
# modules, or ones with unmet dependencies). Collect the skipped modules
|
||||
@ -31,13 +29,9 @@ foreach( SUBDIRECTORY ${SUBDIRECTORIES} )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if ( LIST_SKIPPED_MODULES )
|
||||
message( "${ColorReset}-- Skipped modules:" )
|
||||
foreach( SUBDIRECTORY ${LIST_SKIPPED_MODULES} )
|
||||
message( "${ColorReset}-- Skipped ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
|
||||
endforeach()
|
||||
message( "" )
|
||||
endif()
|
||||
# This is *also* done in top-level, so list is displayed
|
||||
# both before and after the feature summary.
|
||||
calamares_explain_skipped_modules( ${LIST_SKIPPED_MODULES} )
|
||||
|
||||
include( CalamaresAddTranslations )
|
||||
add_calamares_python_translations( ${CALAMARES_TRANSLATION_LANGUAGES} )
|
||||
|
Loading…
Reference in New Issue
Block a user