]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use CONFIGURE_DEPENDS for glob expressions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 13:01:15 +0000 (13:01 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 18 Nov 2020 13:01:15 +0000 (13:01 +0000)
CMakeLists.txt
test/CMakeLists.txt

index 92a458cdf6532bc22db3709372f68682ed410d9f..41f84b939b9634fd7453fe48896d98a8d419fa66 100644 (file)
@@ -5,7 +5,7 @@
 #
 
 ############################# INITIAL SECTION #############################################
-CMAKE_MINIMUM_REQUIRED(VERSION 3.9 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.12 FATAL_ERROR)
 
 SET(RSPAMD_VERSION_MAJOR 2)
 SET(RSPAMD_VERSION_MINOR 7)
@@ -680,7 +680,7 @@ INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${RULESDIR})")
 LIST(LENGTH CONFFILES CONFLIST_COUNT)
 MATH(EXPR CONFLIST_MAX ${CONFLIST_COUNT}-1)
 
-FILE(GLOB_RECURSE CONF_FILES RELATIVE "${CMAKE_SOURCE_DIR}/conf"
+FILE(GLOB_RECURSE CONF_FILES RELATIVE CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/conf"
        "${CMAKE_SOURCE_DIR}/conf/*" )
 FOREACH(CONF_FILE ${CONF_FILES})
        GET_FILENAME_COMPONENT(_rp ${CONF_FILE} PATH)
@@ -691,7 +691,7 @@ ENDFOREACH(CONF_FILE)
 
 # Lua plugins
 
-FILE(GLOB LUA_PLUGINS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua"
+FILE(GLOB LUA_PLUGINS RELATIVE CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua"
        "${CMAKE_CURRENT_SOURCE_DIR}/src/plugins/lua/*.lua" )
 FOREACH(LUA_PLUGIN ${LUA_PLUGINS})
        GET_FILENAME_COMPONENT(_rp ${LUA_PLUGIN} PATH)
@@ -706,14 +706,14 @@ INSTALL(FILES "contrib/publicsuffix/effective_tld_names.dat" DESTINATION
 
 # Install languages data
 INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${SHAREDIR}/languages)")
-FILE(GLOB LANGUAGES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/languages-data/*.json")
+FILE(GLOB LANGUAGES CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/contrib/languages-data/*.json")
 FOREACH(_LANG ${LANGUAGES})
        INSTALL(FILES "${_LANG}" DESTINATION ${SHAREDIR}/languages)
 ENDFOREACH()
 INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/contrib/languages-data/stop_words" DESTINATION ${SHAREDIR}/languages)
 
 # Lua config
-FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/rules"
+FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/rules"
        "${CMAKE_CURRENT_SOURCE_DIR}/rules/*.lua")
 FOREACH(LUA_CONF ${LUA_CONFIGS})
        GET_FILENAME_COMPONENT(_rp ${LUA_CONF} PATH)
@@ -722,7 +722,7 @@ FOREACH(LUA_CONF ${LUA_CONFIGS})
 ENDFOREACH(LUA_CONF)
 
 # Lua libs
-FILE(GLOB_RECURSE LUA_LIBS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/lualib"
+FILE(GLOB_RECURSE LUA_LIBS RELATIVE CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/lualib"
                "${CMAKE_CURRENT_SOURCE_DIR}/lualib/*.lua")
 FOREACH(LUA_LIB ${LUA_LIBS})
        GET_FILENAME_COMPONENT(_rp ${LUA_LIB} PATH)
index 1064a9c766e81458076c759210a3476c34463d99..88b1029f60c2e8e8201e249ed750fa3562653ec8 100644 (file)
@@ -24,7 +24,7 @@ TARGET_LINK_LIBRARIES(rspamd-test rspamd-server)
 
 IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
        # Also add dependencies for convenience
-       FILE(GLOB_RECURSE LUA_TESTS "${CMAKE_CURRENT_SOURCE_DIR}/lua/*")
+       FILE(GLOB_RECURSE LUA_TESTS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/lua/*.*")
        ADD_CUSTOM_TARGET(units-dir COMMAND
                ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/lua/unit"
        )