Module: kamailio Branch: master Commit: cf8cdb99355e19a30460229633eaf087717ee44d URL: https://github.com/kamailio/kamailio/commit/cf8cdb99355e19a30460229633eaf087...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos xk@gilawa.com Date: 2025-05-19T08:15:11Z
cmake: Warning if no modules/group were selected
---
Modified: src/modules/CMakeLists.txt
---
Diff: https://github.com/kamailio/kamailio/commit/cf8cdb99355e19a30460229633eaf087... Patch: https://github.com/kamailio/kamailio/commit/cf8cdb99355e19a30460229633eaf087...
---
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt index cc303f0bb88..0decc1865ab 100644 --- a/src/modules/CMakeLists.txt +++ b/src/modules/CMakeLists.txt @@ -149,8 +149,14 @@ message(STATUS "Modules to be built: ${ADDED_MODULES_LIST}") # TODO: Comment is not showing. probably a bug in CMAKE # https://gitlab.kitware.com/cmake/cmake/-/issues/26571 add_custom_target(modules COMMENT "Building modules") -add_dependencies(modules ${ADDED_MODULES_LIST}) - +if(NOT ADDED_MODULES_LIST) + message( + WARNING + "No modules to build. Did you forget to add a module group or include module?" + ) +else() + add_dependencies(modules ${ADDED_MODULES_LIST}) +endif() get_property(ALL_MODULE_DOC_TARGETS GLOBAL PROPERTY ALL_MODULE_DOC_TARGETS) # message(STATUS "ALL_MODULE_DOC_TARGETS: ${ALL_MODULE_DOC_TARGETS}")