diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index d793b718f..7f93c555a 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -10,8 +10,11 @@ if( BUILD_TESTING ) target_include_directories( test_conf PUBLIC ${YAMLCPP_INCLUDE_DIR} ) endif() -file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) string( REPLACE " " ";" SKIP_LIST "${SKIP_MODULES}" ) + +file( GLOB SUBDIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*" ) +list( SORT SUBDIRECTORIES ) + foreach( SUBDIRECTORY ${SUBDIRECTORIES} ) list( FIND SKIP_LIST ${SUBDIRECTORY} DO_SKIP )