summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2013-09-08 22:13:41 +0000
committerJeff Trawick <trawick@apache.org>2013-09-08 22:13:41 +0000
commit550b738e8935d380c1cef887d6c1676705893287 (patch)
tree57de4f51c76a7ad2d6d7cbd29966556a43134dda /CMakeLists.txt
parent90daf71806b3b01b23bdf46ca7c5b011353a2332 (diff)
downloadhttpd-550b738e8935d380c1cef887d6c1676705893287.tar.gz
Add a global ENABLE_MODULES setting to make it easy
to build and/or activate all possible modules. A few modules that are not currently buildable needed a prereq to be defined so that they will be skipped over appropriately for reasonable values of ENABLE_MODULES. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1520937 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28962fee51..733dbe3be3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,7 @@ SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv lib
# end support library configuration
# Misc. options
+SET(ENABLE_MODULES "O" CACHE STRING "Minimum module enablement (e.g., \"i\" to build all but those without prerequisites)")
SET(WITH_MODULES "" CACHE STRING "comma-separated paths to single-file modules to statically link into the server")
SET(EXTRA_INCLUDE_DIRS "" CACHE STRING "extra include directories")
@@ -78,6 +79,24 @@ FOREACH(onelib ${APR_LIBRARIES})
ENDIF()
ENDFOREACH()
+MACRO(GET_MOD_ENABLE_RANK macro_modname macro_mod_enable_val macro_output_rank)
+ IF(${macro_mod_enable_val} STREQUAL "O")
+ SET(${macro_output_rank} 0)
+ ELSEIF(${macro_mod_enable_val} STREQUAL "i")
+ SET(${macro_output_rank} 1)
+ ELSEIF(${macro_mod_enable_val} STREQUAL "I")
+ SET(${macro_output_rank} 2)
+ ELSEIF(${macro_mod_enable_val} STREQUAL "a")
+ SET(${macro_output_rank} 3)
+ ELSEIF(${macro_mod_enable_val} STREQUAL "A")
+ SET(${macro_output_rank} 4)
+ ELSE()
+ MESSAGE(FATAL_ERROR "Unexpected enablement value \"${macro_mod_enable_val}\" for ${macro_modname}")
+ ENDIF()
+ENDMACRO()
+
+GET_MOD_ENABLE_RANK("ENABLE_MODULES setting" ${ENABLE_MODULES} enable_modules_rank)
+
# Figure out what APR/APU features are available
#
# CHECK_APR_FEATURE checks for features defined to 1 or 0 in apr.h or apu.h
@@ -329,6 +348,7 @@ IF(ZLIB_FOUND)
SET(mod_deflate_extra_includes ${ZLIB_INCLUDE_DIR})
SET(mod_deflate_extra_libs ${ZLIB_LIBRARIES})
ENDIF()
+SET(mod_firehose_requires SOMEONE_TO_MAKE_IT_COMPILE_ON_WINDOWS)
SET(mod_heartbeat_extra_libs mod_watchdog)
SET(mod_ldap_extra_defines LDAP_DECLARE_EXPORT)
SET(mod_ldap_extra_libs wldap32)
@@ -372,11 +392,13 @@ SET(mod_sed_extra_sources
modules/filters/regexp.c modules/filters/sed0.c
modules/filters/sed1.c
)
+SET(mod_serf_requires AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT)
SET(mod_session_extra_defines SESSION_DECLARE_EXPORT)
SET(mod_session_cookie_extra_libs mod_session)
SET(mod_session_crypto_requires APU_HAVE_CRYPTO)
SET(mod_session_crypto_extra_libs mod_session)
SET(mod_session_dbd_extra_libs mod_session)
+SET(mod_socache_dc_requires AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT)
SET(mod_ssl_requires OPENSSL_FOUND)
IF(OPENSSL_FOUND)
SET(mod_ssl_extra_includes ${OPENSSL_INCLUDE_DIR})
@@ -610,6 +632,13 @@ FOREACH (mod ${MODULE_PATHS})
STRING(TOUPPER "ENABLE_${mod_shortname}" enable_mod)
SET(enable_mod_val ${${enable_mod}})
+ # Is ENABLE_MODULES set to a higher value?
+ GET_MOD_ENABLE_RANK(${mod_name} ${enable_mod_val} this_mod_rank)
+ IF(this_mod_rank LESS enable_modules_rank)
+ # Use the value from ENABLE_MODULES
+ SET(enable_mod_val ${ENABLE_MODULES})
+ ENDIF()
+
IF(NOT ${enable_mod_val} STREQUAL "O") # build of module is desired
SET(mod_requires "${mod_name}_requires")
STRING(TOUPPER ${enable_mod_val} enable_mod_val_upper)