@ -15,13 +15,31 @@ string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" )
file ( GLOB SUBDIRECTORIES RELATIVE ${ CMAKE_CURRENT_SOURCE_DIR } "*" )
file ( GLOB SUBDIRECTORIES RELATIVE ${ CMAKE_CURRENT_SOURCE_DIR } "*" )
list ( SORT SUBDIRECTORIES )
list ( SORT SUBDIRECTORIES )
# H a n d l e t h e U S E _ < f o o > v a r i a b l e s b y l o o k i n g f o r s u b d i r e c t o r i e s
# w i t h a < f o o > - < i m p l e m e n t a t i o n > k i n d o f n a m e .
foreach ( SUBDIRECTORY ${ SUBDIRECTORIES } )
endforeach ( )
foreach ( SUBDIRECTORY ${ SUBDIRECTORIES } )
foreach ( SUBDIRECTORY ${ SUBDIRECTORIES } )
list ( FIND SKIP_LIST ${ SUBDIRECTORY } DO_SKIP )
list ( FIND SKIP_LIST ${ SUBDIRECTORY } DO_SKIP )
set ( _skip_reason "user request" )
if ( SUBDIRECTORY MATCHES "^[a-zA-Z0-9_]+-" )
string ( REGEX REPLACE "^[^-]+-" "" _implementation ${ SUBDIRECTORY } )
string ( REGEX REPLACE "-.*" "" _category ${ SUBDIRECTORY } )
if ( USE_ ${ _category } )
if ( NOT "${_implementation}" STREQUAL "${USE_${_category}}" )
list ( APPEND SKIP_LIST ${ SUBDIRECTORY } )
set ( _skip_reason "USE_${_category}=${USE_${_category}}" )
set ( DO_SKIP 1 )
endif ( )
endif ( )
endif ( )
if ( NOT DO_SKIP EQUAL -1 )
if ( NOT DO_SKIP EQUAL -1 )
message ( "${ColorReset}-- Skipping module ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
message ( "${ColorReset}-- Skipping module ${BoldRed}${SUBDIRECTORY}${ColorReset}." )
message ( "" )
message ( "" )
list ( APPEND LIST_SKIPPED_MODULES "${SUBDIRECTORY} (user request)" )
list ( APPEND LIST_SKIPPED_MODULES "${SUBDIRECTORY} ( ${_skip_reason} )" )
elseif ( ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" ) AND
elseif ( ( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIRECTORY}" ) AND
( D O _ S K I P E Q U A L - 1 ) )
( D O _ S K I P E Q U A L - 1 ) )
set ( SKIPPED_MODULES )
set ( SKIPPED_MODULES )