- Move cmake options into their own file, making it easier to

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
This commit is contained in:
Jörg Mayer 2010-05-15 20:41:53 +00:00
parent 682b962e72
commit e4eecc5215
4 changed files with 91 additions and 38 deletions

View 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

41
CMakeOptions.txt Normal file
View File

@ -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)

View File

@ -22,14 +22,19 @@
#
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)

View 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])