Navigation


Changeset 583:7d431a751d6c in freeDiameter


Ignore:
Timestamp:
Oct 28, 2010, 12:59:03 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added the ALL_EXTENSIONS build option; and simplified some CMakeFile directives

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • contrib/nightly_tests/allext.conf

    r443 r583  
    66set(CTEST_BUILD_NAME "All extensions")
    77
    8 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_ACL_WL:BOOL=ON")
    9 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_APP_ACCT:BOOL=ON -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test")
    10 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_APP_DIAMEAP:BOOL=ON -DBUILD_EAP_IDENTITY:BOOL=ON -DBUILD_EAP_MD5:BOOL=ON -DBUILD_EAP_TLS:BOOL=ON")
    11 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_APP_RADGW:BOOL=ON")
    12 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_APP_SIP:BOOL=ON")
    13 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_DBG_MONITOR:BOOL=ON")
    14 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_DBG_RT:BOOL=ON")
    15 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_DICT_EAP:BOOL=ON")
    16 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_DICT_NASREQ:BOOL=ON")
    17 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_DICT_SIP:BOOL=ON")
    18 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RGWX_ACCT:BOOL=ON")
    19 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RGWX_AUTH:BOOL=ON")
    20 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RGWX_DEBUG:BOOL=ON")
    21 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RGWX_ECHODROP:BOOL=ON")
    22 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RGWX_SAMPLE:BOOL=ON")
    23 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_RT_DEFAULT:BOOL=ON")
    24 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_TEST_APP:BOOL=ON")
    25 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DBUILD_TEST_SIP:BOOL=ON")
     8set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON")
     9set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test")
    2610
  • extensions/CMakeLists.txt

    r524 r583  
    1313ENDMACRO(FD_ADD_EXTENSION)
    1414
     15# Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to
     16# add a new extension subdirectory.
     17MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT)
     18   STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME)
     19   IF (NOT ALL_EXTENSIONS)
     20     OPTION(BUILD_${EXTMACRONAME} "Build ${EXTSUBDIR}.fdx? (${EXTDESCR})" ${EXTDEFAULT})
     21   ENDIF (NOT ALL_EXTENSIONS)
     22   IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
     23      SUBDIRS(${EXTSUBDIR})
     24   ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
     25ENDMACRO(FD_EXTENSION_SUBDIR)
     26
     27OPTION(ALL_EXTENSIONS "Build ALL available extensions? (disable to select individual components)" OFF)
     28
    1529# The extensions include the headers of freeDiameter that contains gnutls objects
    1630FIND_PACKAGE(GnuTLS REQUIRED)
     
    2337INCLUDE_DIRECTORIES(${GCRYPT_INCLUDE_DIR})
    2438
     39
    2540###########################
    2641# Extensions section
    2742
    2843####
    29 # Diameter applications dictionary
     44# Diameter applications dictionaries
    3045
    31 OPTION(BUILD_DICT_NASREQ "Build NASREQ (RFC4005) Dictionary definitions?" ON)
    32         IF (BUILD_DICT_NASREQ)
    33            SUBDIRS(dict_nasreq)
    34         ENDIF (BUILD_DICT_NASREQ)
    35 
    36 OPTION(BUILD_DICT_EAP "Build Diameter EAP (RFC4072) Dictionary definitions?" ON)
    37         IF (BUILD_DICT_EAP)
    38            SUBDIRS(dict_eap)
    39         ENDIF (BUILD_DICT_EAP)
    40 
    41 OPTION(BUILD_DICT_SIP "Build Diameter SIP (RFC4740) Dictionary definitions?" ON)
    42         IF (BUILD_DICT_SIP)
    43            SUBDIRS(dict_sip)
    44         ENDIF (BUILD_DICT_SIP)
    45 
     46FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions?"       ON)
     47FD_EXTENSION_SUBDIR(dict_eap    "Diameter EAP (RFC4072) Dictionary definitions?" ON)
     48FD_EXTENSION_SUBDIR(dict_sip    "Diameter SIP (RFC4740) Dictionary definitions?" ON)
    4649
    4750
     
    4952# Diameter applications
    5053
    51 OPTION(BUILD_APP_RADGW "Build app_radgw? (one-way RADIUS/Diameter gateway - RADIUS NAS <-> Diameter server)" OFF)
    52         IF (BUILD_APP_RADGW)
    53            SUBDIRS(app_radgw)
    54         ENDIF (BUILD_APP_RADGW)
     54FD_EXTENSION_SUBDIR(app_acct    "Simple accounting application that stores accounting records in flat database" OFF)
     55FD_EXTENSION_SUBDIR(app_diameap "Diameter EAP Application server (RFC 4072)"                                    OFF)
     56FD_EXTENSION_SUBDIR(app_radgw   "RADIUS/Diameter gateway translation - RADIUS client to Diameter server"        OFF)
     57FD_EXTENSION_SUBDIR(app_sip     "Diameter SIP Authentication and Authorization server (RFC 4740)"               OFF)
    5558
    56 OPTION(BUILD_APP_ACCT "Build app_acct? (simple accounting application that stores accounting records in flat database)" OFF)
    57         IF (BUILD_APP_ACCT)
    58            SUBDIRS(app_acct)
    59         ENDIF (BUILD_APP_ACCT)
    60 
    61 OPTION(BUILD_APP_SIP "Build app_sip? (Authentication and Authorization for Diameter SIP RFC4740)" OFF)
    62         IF (BUILD_APP_SIP)
    63            SUBDIRS(app_sip)
    64         ENDIF (BUILD_APP_SIP)
    65 
    66 OPTION(BUILD_APP_DIAMEAP "Build app_diameap? (Diameter EAP Application - RFC 4072 )" OFF)
    67         IF (BUILD_APP_DIAMEAP)
    68            SUBDIRS(app_diameap)
    69         ENDIF (BUILD_APP_DIAMEAP)
    7059
    7160####
    7261# Routing extensions
    7362
    74 OPTION(BUILD_RT_DEFAULT "Build rt_default? (Configurable routing rules for freeDiameter)" ON)
    75         IF (BUILD_RT_DEFAULT)
    76            SUBDIRS(rt_default)
    77         ENDIF (BUILD_RT_DEFAULT)
    78 
    79 OPTION(BUILD_RT_EREG "Build rt_ereg? (Configurable routing based on regexp matching of AVP values)" OFF)
    80         IF (BUILD_RT_EREG)
    81            SUBDIRS(rt_ereg)
    82         ENDIF (BUILD_RT_EREG)
     63FD_EXTENSION_SUBDIR(rt_default "Configurable routing rules for freeDiameter"                 ON)
     64FD_EXTENSION_SUBDIR(rt_ereg    "Configurable routing based on regexp matching of AVP values" OFF)
    8365
    8466
     
    8668# Peers security extensions
    8769
    88 OPTION(BUILD_ACL_WL "Build acl_wl? (White-list of remote connecting peers)" ON)
    89         IF (BUILD_ACL_WL)
    90                 SUBDIRS(acl_wl)
    91         ENDIF (BUILD_ACL_WL)
    92 
     70FD_EXTENSION_SUBDIR(acl_wl "White-list based authorization of incoming connections" ON)
    9371
    9472
     
    9674# Debug & test extensions
    9775
    98 OPTION(BUILD_DBG_MONITOR "Build dbg_monitor.fdx? (display periodical debug information on the console)" OFF)
    99         IF (BUILD_DBG_MONITOR)
    100            SUBDIRS(dbg_monitor)
    101         ENDIF (BUILD_DBG_MONITOR)
     76FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information"              OFF)
     77FD_EXTENSION_SUBDIR(dbg_rt      "Routing extension for debugging the routing module" OFF)
     78FD_EXTENSION_SUBDIR(test_app    "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF)
     79FD_EXTENSION_SUBDIR(test_sip    "Testing application to simulate Diameter-SIP client (RFC4740)" OFF)
    10280
    103 OPTION(BUILD_DBG_RT "Build dbg_rt.fdx? (Routing extension for debugging the routing module)" OFF)
    104         IF (BUILD_DBG_RT)
    105            SUBDIRS(dbg_rt)
    106         ENDIF (BUILD_DBG_RT)
    10781
    108 OPTION(BUILD_TEST_APP "Build test_app.fdx? (Testing application to send dummy message to another peer, for testing purpose only)" OFF)
    109         IF (BUILD_TEST_APP)
    110            SUBDIRS(test_app)
    111         ENDIF (BUILD_TEST_APP)
    112 
    113 OPTION(BUILD_TEST_SIP "Build test_sip.fdx? (Testing application to simulate Diameter-SIP client (RFC4740), for testing purpose only)" OFF)
    114         IF (BUILD_TEST_SIP)
    115            SUBDIRS(test_sip)
    116         ENDIF (BUILD_TEST_SIP)
    117        
    11882# The following extension have very little use except for specific tests, so we disable them except in Debug configurations.
    11983IF (CMAKE_BUILD_TYPE MATCHES "Debug")
    120         OPTION(BUILD_SAMPLE "Build sample.fdx? (Simple extension to demonstrate extension mechanism, for developpers only)" OFF)
    121                 IF (BUILD_SAMPLE)
    122                    SUBDIRS(_sample)
    123                 ENDIF (BUILD_SAMPLE)
    124 
    125         OPTION(BUILD_TEST_ACCT "Build test_acct.fdx? (Receive Accounting-Requests and display the data, but no storage)" OFF)
    126                 IF (BUILD_TEST_ACCT)
    127                    SUBDIRS(test_acct)
    128                 ENDIF (BUILD_TEST_ACCT)
    129                
    130         OPTION(BUILD_TEST_RT_ANY "Build test_rt_any.fdx? (Routing extension randomly sending message to any peer available, for testing purpose only)" OFF)
    131                 IF (BUILD_TEST_RT_ANY)
    132                    SUBDIRS(test_rt_any)
    133                 ENDIF (BUILD_TEST_RT_ANY)
     84        FD_EXTENSION_SUBDIR(_sample     "Simple extension to demonstrate extension mechanism, for developpers" OFF)
     85        FD_EXTENSION_SUBDIR(test_acct   "Receive Accounting-Requests and display the data, but no storage" OFF)
     86        FD_EXTENSION_SUBDIR(test_rt_any "Routing extension randomly sending message to any peer available, for testing purpose" OFF)
    13487ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug")
    13588
  • extensions/app_diameap/plugins/CMakeLists.txt

    r438 r583  
    1010ENDMACRO(EAP_ADD_METHOD)
    1111
     12# Use the macro FD_EAP_PLUGIN(extmacroname subdir descr default) to
     13# add a new extension subdirectory.
     14MACRO(FD_EAP_PLUGIN EXTSUBDIR EXTDESCR EXTDEFAULT)
     15   STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME)
     16   IF (NOT ALL_EXTENSIONS)
     17     OPTION(BUILD_${EXTMACRONAME} ${EXTDESCR} ${EXTDEFAULT})
     18   ENDIF (NOT ALL_EXTENSIONS)
     19   IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
     20      ADD_SUBDIRECTORY(${EXTSUBDIR})
     21   ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS)
     22ENDMACRO(FD_EAP_PLUGIN)
     23
    1224###########################
    1325# EAP Methods Plugins Section
    1426
    1527# EAP Identity plugin
    16 OPTION(BUILD_EAP_IDENTITY "Build EAP Identity Plugin " ON)
    17         IF (BUILD_EAP_IDENTITY)
    18            ADD_SUBDIRECTORY(eap_identity)
    19         ENDIF (BUILD_EAP_IDENTITY)
     28FD_EAP_PLUGIN(eap_identity "Build EAP Identity Plugin " ON)
    2029
    2130# EAP MD5 plugin
    22 OPTION(BUILD_EAP_MD5 "Build EAP-MD5 Plugin " OFF)
    23         IF (BUILD_EAP_MD5)
    24            ADD_SUBDIRECTORY(eap_md5)
    25         ENDIF (BUILD_EAP_MD5)
     31FD_EAP_PLUGIN(eap_md5 "Build EAP-MD5 Plugin " OFF)
    2632
    2733# EAP TLS plugin
    28 OPTION(BUILD_EAP_TLS "Build EAP-TLS Plugin " OFF)
    29         IF (BUILD_EAP_TLS)
    30            ADD_SUBDIRECTORY(eap_tls)
    31         ENDIF (BUILD_EAP_TLS)
     34FD_EAP_PLUGIN(eap_tls "Build EAP-TLS Plugin " OFF)
  • extensions/app_radgw/CMakeLists.txt

    r561 r583  
    6060ENDMACRO(RGWX_ADD_PLUGIN)
    6161
     62# Ask unless ALL_EXTENSIONS is set:
     63MACRO(FD_OPTION_PLUGIN PLGVAR DESCR DEFLT)
     64   IF (NOT ALL_EXTENSIONS)
     65     OPTION(BUILD_${PLGVAR} ${DESCR} ${DEFLT})
     66   ENDIF (NOT ALL_EXTENSIONS)
     67   IF (BUILD_${PLGVAR} OR ALL_EXTENSIONS)
     68     SET(${PLGVAR} TRUE)
     69   ELSE (BUILD_${PLGVAR} OR ALL_EXTENSIONS)
     70     SET(${PLGVAR} FALSE)
     71   ENDIF (BUILD_${PLGVAR} OR ALL_EXTENSIONS)
     72ENDMACRO(FD_OPTION_PLUGIN PLGVAR DESCR DEFLT)
     73
    6274
    6375### Debug
    6476# Example of plugin:
    65 OPTION(BUILD_RGWX_SAMPLE "Build sample plugin? (for developers only)" OFF)
    66         IF (BUILD_RGWX_SAMPLE)
     77
     78FD_OPTION_PLUGIN(RGWX_SAMPLE "Build sample plugin? (for developers only)" OFF)
     79        IF (RGWX_SAMPLE)
    6780           RGWX_ADD_PLUGIN(sample ${RG_COMMON_HEADER} rgwx_sample.c)
    68         ENDIF (BUILD_RGWX_SAMPLE)
     81        ENDIF (RGWX_SAMPLE)
    6982
    7083# A plugin for debug: dumps RADIUS and Diameter messages state at the time the plugin is called.
    71 OPTION(BUILD_RGWX_DEBUG "Build debug plugin? (display status of RADIUS and Diameter messages)" ON)
    72         IF (BUILD_RGWX_DEBUG)
     84FD_OPTION_PLUGIN(RGWX_DEBUG "Build debug plugin? (display status of RADIUS and Diameter messages)" ON)
     85        IF (RGWX_DEBUG)
    7386           RGWX_ADD_PLUGIN(debug ${RG_COMMON_HEADER} rgwx_debug.c)
    74         ENDIF (BUILD_RGWX_DEBUG)
     87        ENDIF (RGWX_DEBUG)
    7588
    7689
    7790### Authentication, Authorization messages translation.
    78 OPTION(BUILD_RGWX_AUTH "Build Authentication & Authorization RADIUS translation plugin? (RFC2865, RFC3579)" ON)
    79         IF (BUILD_RGWX_AUTH)
     91FD_OPTION_PLUGIN(RGWX_AUTH "Build Authentication & Authorization RADIUS translation plugin? (RFC2865, RFC3579)" ON)
     92        IF (RGWX_AUTH)
    8093           RGWX_ADD_PLUGIN(auth ${RG_COMMON_HEADER} rgwx_auth.c)
    81         ENDIF (BUILD_RGWX_AUTH)
     94        ENDIF (RGWX_AUTH)
    8295
    8396### SIP Authentication, Authorization messages translation.
    84 OPTION(BUILD_RGWX_SIP "Build SIP RADIUS translation plugin? (RFC4740 or RFC5090)" OFF)
    85         IF (BUILD_RGWX_SIP)
     97FD_OPTION_PLUGIN(RGWX_SIP "Build SIP RADIUS translation plugin? (RFC4740 or RFC5090)" OFF)
     98        IF (RGWX_SIP)
    8699           RGWX_ADD_PLUGIN(sip ${RG_COMMON_HEADER} rgwx_sip.c)
    87         ENDIF (BUILD_RGWX_SIP)
     100        ENDIF (RGWX_SIP)
    88101
    89102
    90103
    91104### Accounting messages translation.
    92 OPTION(BUILD_RGWX_ACCT "Build Accounting RADIUS translation plugin? (RFC2866)" ON)
    93         IF (BUILD_RGWX_ACCT)
     105FD_OPTION_PLUGIN(RGWX_ACCT "Build Accounting RADIUS translation plugin? (RFC2866)" ON)
     106        IF (RGWX_ACCT)
    94107           RGWX_ADD_PLUGIN(acct ${RG_COMMON_HEADER} rgwx_acct.c)
    95         ENDIF (BUILD_RGWX_ACCT)
     108        ENDIF (RGWX_ACCT)
    96109
    97110
    98111### Generic plugin to handle some attributes (either delete them or simply echo them in the answer)
    99 OPTION(BUILD_RGWX_ECHODROP "Build 'echo/drop' plugin? (drop specific RADIUS attributes or echo them in RADIUS answer)" ON)
    100         IF (BUILD_RGWX_ECHODROP)
     112FD_OPTION_PLUGIN(RGWX_ECHODROP "Build 'echo/drop' plugin? (drop specific RADIUS attributes or echo them in RADIUS answer)" ON)
     113        IF (RGWX_ECHODROP)
    101114           BISON_FILE(rgwx_echodrop.y)
    102115           FLEX_FILE(rgwx_echodrop.l)
    103116           SET_SOURCE_FILES_PROPERTIES(lex.rgwx_echodrop.c rgwx_echodrop.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}")
    104117           RGWX_ADD_PLUGIN(echodrop ${RG_COMMON_HEADER} rgwx_echodrop.h rgwx_echodrop.c lex.rgwx_echodrop.c rgwx_echodrop.tab.c rgwx_echodrop.tab.h )
    105         ENDIF (BUILD_RGWX_ECHODROP)
     118        ENDIF (RGWX_ECHODROP)
    106119       
    107120       
Note: See TracChangeset for help on using the changeset viewer.