From: Josh Date: Tue, 24 Jun 2014 14:15:14 +0000 (-0400) Subject: fixing cmake X-Git-Tag: 3.0.0-233~1464^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a011e2530dfbed5be4d7ea8a80bcf8cdbce315b2;p=thirdparty%2Fsnort3.git fixing cmake --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 500d7ab57..27c63fd82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(snort CXX C) set(SNORT_VERSION_MAJOR 2) set(SNORT_VERSION_MINOR 10) -set(SNORT_VERSION_BUILD 087) +set(SNORT_VERSION_BUILD 093) set(VERSION "${SNORT_VERSION_MAJOR}.${SNORT_VERSION_MINOR}.${SNORT_VERSION_BUILD}") # ensure cmake will look in the cmake directory for configuration files diff --git a/cmake/createCommandLineOptions.cmake b/cmake/createCommandLineOptions.cmake index b854cfb0c..c74c030c4 100644 --- a/cmake/createCommandLineOptions.cmake +++ b/cmake/createCommandLineOptions.cmake @@ -5,7 +5,7 @@ # use `ccmamke ${PATH_TO_SOURCE}`. -option (STATIC_DECODERS "include decoders in binary?" ON) +option (STATIC_CODECS "include decoders in binary?" ON) option (STATIC_INSPECTORS "include inspectors in binary" ON) option (STATIC_LOGGERS "include loggers in binary" ON) option (STATIC_IPS_OPTIONS "include ips options in binary" ON) diff --git a/cmake/setConfigureOptions.cmake b/cmake/setConfigureOptions.cmake index 3fd059913..7a0574866 100644 --- a/cmake/setConfigureOptions.cmake +++ b/cmake/setConfigureOptions.cmake @@ -41,7 +41,7 @@ set_if_true( STATIC_INSPECTORS STATIC_INSPECTORS ) set_if_true( STATIC_SEARCH_ENGINES STATIC_SEARCH_ENGINES ) set_if_true( STATIC_LOGGERS STATIC_LOGGERS ) set_if_true( STATIC_IPS_OPTIONS STATIC_IPS_OPTIONS ) -set_if_true( STATIC_DECODERS STATIC_DECODERS ) +set_if_true( STATIC_CODECS STATIC_CODECS ) set_if_true( BUILD_SIDE_CHANNEL SIDE_CHANNEL ) set_if_true( ENABLE_VALGRIND VALGRIND_TESTING ) set_if_true( ENABLE_PPM PPM_MGR ) diff --git a/config.cmake.h.in b/config.cmake.h.in index 492da2649..d68ebfd0c 100644 --- a/config.cmake.h.in +++ b/config.cmake.h.in @@ -56,7 +56,7 @@ #cmakedefine STATIC_SEARCH_ENGINES 1 /* include internal decoders in binary */ -#cmakedefine STATIC_DECODERS 1 +#cmakedefine STATIC_CODECS 1 /* built control socket */ #cmakedefine CONTROL_SOCKET 1 diff --git a/configure_cmake.sh b/configure_cmake.sh index 5f5149d1e..fb21a5c93 100755 --- a/configure_cmake.sh +++ b/configure_cmake.sh @@ -43,6 +43,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... --disable-static-loggers do not include loggers in binary --disable-static-ips-options do not include ips options in binary --disable-static-search-engines do not include search engines in binary + --disable-static-codecs do not include codecs in binary --enable-control-socket Enable the control socket (Linux only) --enable-side-channel Enable the side channel (Linux only) --enable-valgrind Only use if you are testing with valgrind. @@ -169,11 +170,11 @@ while [ $# -ne 0 ]; do prefix=$optarg append_cache_entry CMAKE_INSTALL_PREFIX PATH $optarg ;; - --disable-static-decoders) - append_cache_entry STATIC_DECODERS BOOL false + --disable-static-codecs) + append_cache_entry STATIC_CODECS BOOL false ;; - --enable-static-decoders) - append_cache_entry STATIC_DECODERS BOOL true + --enable-static-codecs) + append_cache_entry STATIC_CODECS BOOL true ;; --disable-static-inspectors) append_cache_entry STATIC_INSPECTORS BOOL false diff --git a/src/codecs/codec_api.cc b/src/codecs/codec_api.cc index 02f236376..ed1d15686 100644 --- a/src/codecs/codec_api.cc +++ b/src/codecs/codec_api.cc @@ -43,7 +43,7 @@ extern const BaseApi* cd_tcp; extern const BaseApi* cd_udp; extern const BaseApi* cd_esp; -#ifdef STATIC_DECODERS +#ifdef STATIC_CODECS extern const BaseApi* cd_ah; extern const BaseApi* cd_arp; extern const BaseApi* cd_dstopts; @@ -98,7 +98,7 @@ const BaseApi* codecs[] = cd_udp, cd_esp, -#ifdef STATIC_DECODERS +#ifdef STATIC_CODECS cd_ah, cd_arp, cd_dstopts, diff --git a/src/codecs/ip/cd_ah.cc b/src/codecs/ip/cd_ah.cc index b3bdba9d8..5218f081d 100644 --- a/src/codecs/ip/cd_ah.cc +++ b/src/codecs/ip/cd_ah.cc @@ -136,6 +136,3 @@ SO_PUBLIC const BaseApi* snort_plugins[] = #else const BaseApi* cd_ah = &ah_api.base; #endif - - - diff --git a/src/codecs/ip/cd_pgm.cc b/src/codecs/ip/cd_pgm.cc index 3e17e2180..dc5e6f01e 100644 --- a/src/codecs/ip/cd_pgm.cc +++ b/src/codecs/ip/cd_pgm.cc @@ -199,5 +199,13 @@ static const CodecApi pgm_api = dtor, // dtor }; +#ifdef BUILDING_SO +SO_PUBLIC const BaseApi* snort_plugins[] = +{ + &pgm_api.base, + nullptr +}; +#else const BaseApi* cd_pgm = &pgm_api.base; +#endif