- Move cmake options into their own file, making it easier to
authorJörg Mayer <jmayer@loplof.de>
Sat, 15 May 2010 20:41:53 +0000 (20:41 -0000)
committerJörg Mayer <jmayer@loplof.de>
Sat, 15 May 2010 20:41:53 +0000 (20:41 -0000)
  use a locally modified version of the stuff
- Some (still preliminary) CPack changes
- Add -fexcess-precision=fast (configure.in and CmakeLists.txt)
  to the compileflags (new gcc-4.5 feature to maintain backward
  compatibility with gcc-4.4 and IMO we don't need the slower but
  more exact implementation gcc 4.5 offers.

svn path=/trunk/; revision=32823

CMakeLists.txt
CMakeOptions.txt [new file with mode: 0644]
CPackConfig.txt
configure.in

index e30a8a52ef919b89a4c16d7b38816da6c13d838e..593f7728b627304601fda08701a8c2cf43ac8345 100644 (file)
@@ -92,42 +92,8 @@ if(NOT LIBRARY_OUTPUT_PATH)
                   "Single output directory for building all libraries.")
 endif()
 
-option(BUILD_wireshark   "Build the GUI version of Wireshark" ON)
-option(BUILD_tshark      "Build tshark" ON)
-option(BUILD_rawshark    "Build rawshark" ON)
-option(BUILD_dumpcap     "Build dumpcap" ON)
-option(BUILD_text2pcap   "Build text2pcap" ON)
-option(BUILD_mergecap    "Build mergecap" ON)
-option(BUILD_editcap     "Build editcap" ON)
-option(BUILD_capinfos    "Build capinfos" ON)
-option(BUILD_randpkt     "Build randpkt" ON)
-option(BUILD_dftest      "Build dftest" ON)
-option(AUTOGEN_dcerpc    "Autogenerate dcerpc dissectors" OFF)
-option(AUTOGEN_pidl      "Autogenerate pidl dissectors" OFF)
-
-option(DISABLE_WERROR   "Do not treat Warnings as errors" OFF)
-option(ENABLE_EXTRA_GCC_CHECKS "Do additional -W checks in GCC (disables -Werror)" OFF)
-option(ENABLE_AIRPCAP   "Enable Airpcap support" ON)
-# todo
-option(ENABLE_STATIC     "Build a static version of Wireshark (not yet working)" OFF)
-option(ENABLE_PLUGINS    "Build with plugins" ON)
-# todo
-option(ENABLE_GUIDES     "Build Guides" ON)
-
-option(ENABLE_ADNS       "Build with adns support" ON)
-option(ENABLE_PCRE       "Build with pcre support" ON)
-option(ENABLE_PORTAUDIO  "Build with portaudio support" ON)
-option(ENABLE_ZLIB       "Build with zlib compression support" ON)
-option(ENABLE_LUA       "Build with lua dissector support" ON)
-option(ENABLE_PYTHON    "Build with python dissector support" ON)
-option(ENABLE_SMI       "Build with smi snmp support" ON)
-option(ENABLE_GNUTLS    "Build with GNU TLS support" ON)
-option(ENABLE_GCRYPT    "Build with GNU crypto support" ON)
-option(ENABLE_GEOIP     "Build with GeoIP support" ON)
-option(ENABLE_CAP       "Build with posix capabilities support" ON)
-option(ENABLE_CARES      "Build with c_ares support" ON)
-# todo Mostly hardcoded
-option(ENABLE_KERBEROS  "Build with Kerberos support" ON)
+
+include(CMakeOptions.txt)
 
 
 set(WIRESHARK_C_FLAGS
@@ -142,6 +108,7 @@ set(WIRESHARK_C_FLAGS
        -Warray-bounds
        -Wcast-align
        -Wformat-security
+       -fexcess-precision=fast
 )
 
 set(WIRESHARK_EXTRA_C_FLAGS
diff --git a/CMakeOptions.txt b/CMakeOptions.txt
new file mode 100644 (file)
index 0000000..24b1c5d
--- /dev/null
@@ -0,0 +1,41 @@
+# Build options for use by CMake
+
+# $Id$
+
+option(BUILD_wireshark   "Build the GUI version of Wireshark" ON)
+option(BUILD_tshark      "Build tshark" ON)
+option(BUILD_rawshark    "Build rawshark" ON)
+option(BUILD_dumpcap     "Build dumpcap" ON)
+option(BUILD_text2pcap   "Build text2pcap" ON)
+option(BUILD_mergecap    "Build mergecap" ON)
+option(BUILD_editcap     "Build editcap" ON)
+option(BUILD_capinfos    "Build capinfos" ON)
+option(BUILD_randpkt     "Build randpkt" ON)
+option(BUILD_dftest      "Build dftest" ON)
+option(AUTOGEN_dcerpc    "Autogenerate dcerpc dissectors" OFF)
+option(AUTOGEN_pidl      "Autogenerate pidl dissectors" OFF)
+
+option(DISABLE_WERROR   "Do not treat Warnings as errors" OFF)
+option(ENABLE_EXTRA_GCC_CHECKS "Do additional -W checks in GCC (disables -Werror)" OFF)
+option(ENABLE_AIRPCAP   "Enable Airpcap support" ON)
+# todo
+option(ENABLE_STATIC     "Build a static version of Wireshark (not yet working)" OFF)
+option(ENABLE_PLUGINS    "Build with plugins" ON)
+# todo
+option(ENABLE_GUIDES     "Build Guides" ON)
+
+option(ENABLE_ADNS       "Build with adns support" ON)
+option(ENABLE_PCRE       "Build with pcre support" ON)
+option(ENABLE_PORTAUDIO  "Build with portaudio support" ON)
+option(ENABLE_ZLIB       "Build with zlib compression support" ON)
+option(ENABLE_LUA       "Build with lua dissector support" ON)
+option(ENABLE_PYTHON    "Build with python dissector support" ON)
+option(ENABLE_SMI       "Build with smi snmp support" ON)
+option(ENABLE_GNUTLS    "Build with GNU TLS support" ON)
+option(ENABLE_GCRYPT    "Build with GNU crypto support" ON)
+option(ENABLE_GEOIP     "Build with GeoIP support" ON)
+option(ENABLE_CAP       "Build with posix capabilities support" ON)
+option(ENABLE_CARES      "Build with c_ares support" ON)
+# todo Mostly hardcoded
+option(ENABLE_KERBEROS  "Build with Kerberos support" ON)
+
index afb7f69698a12d0afa930824bc52b695cd99ada9..8bdab476ab645f729ea785790e68540ee156810c 100644 (file)
 #
 
 set(CPACK_PACKAGE_NAME wireshark)
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "capture packet")
-set(CPACK_PACKAGE_VENDOR "wireshark")
+set(CPACK_PACKAGE_DESCRIPTION "A set of command line and gui tools to capture and decode traffic")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Packet capturing and decoding")
+set(CPACK_PACKAGE_VENDOR "Wireshark developers")
+set(CPACK_PACKAGE_NAME "wireshark")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
 set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_MAJOR_VERSION}")
 set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_MINOR_VERSION}")
 set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}")
 set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+set(CPACK_PACKAGE_CONTACT "wireshark-users@wireshark.org")
+# set(CPACK_PACKAGE_EXECUTABLES "wireshark")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
+set(CPACK_STRIP_FILES true)
 
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr")
@@ -40,3 +45,41 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr")
 set(CPACK_GENERATOR "TGZ")
 #set(CPACK_SOURCE_GENERATOR "TGZ")
 
+#===============================================
+# IF(APPLE)
+#         SET(CPACK_GENERATOR "${CPACK_GENERATOR};Bundle")
+#         SET(CPACK_BUNDLE_ICON "${OBDGPSLogger_SOURCE_DIR}/osx/BundleIcon.icns")
+#         SET(CPACK_BUNDLE_NAME "OBD GPS Logger")
+#         SET(CPACK_BUNDLE_PLIST "${OBDGPSLogger_SOURCE_DIR}/osx/Info.plist")
+#         SET(CPACK_BUNDLE_STARTUP_COMMAND "${OBDGPSLogger_SOURCE_DIR}/osx/StartupCommand")
+#
+#         IF(GPSD_DAEMON)
+#                 INSTALL(PROGRAMS ${GPSD_DAEMON}
+#                                 DESTINATION sbin/)
+#         ENDIF(GPSD_DAEMON)
+# ELSE(APPLE)
+#
+#         # If we can find rpmbuild, then go for it
+#         FIND_PROGRAM(RPMBUILD_TEST rpmbuild INTERNAL)
+#         IF(RPMBUILD_TEST)
+#                 SET(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
+#                 SET(CPACK_RPM_PACKAGE_REQUIRES "gpsd >= 2.0")
+#                 SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+")
+#         ENDIF(RPMBUILD_TEST)
+#
+#         # If we can find dpkg, build a .deb
+#         #FIND_PROGRAM(DPKG_TEST dpkg INTERNAL)
+#         #IF(DPKG_TEST)
+#                 SET(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
+#                 SET(CPACK_DEBIAN_PACKAGE_DEPENDS "gpsd (>=2.0)")
+#                 SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
+#         #ENDIF(DPKG_TEST)
+#
+# ENDIF(APPLE)
+#
+#
+#
+#===============================================
+
+include(CPack)
+
index 7198cc123fca2f56a46f8f397e85147579c4475e..5ddfa58e64283f31edb2a076a78584d6ba7ab1b8 100644 (file)
@@ -302,6 +302,8 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
+# Use the faster pre gcc 4.5 floating point precision
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-fexcess-precision=fast)
 
 AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed])
 # AC_WIRESHARK_GCC_LDFLAGS_CHECK([-flto])