aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2021-10-07Version: 3.5.1 → 3.7.0Gerald Combs1-2/+2
[skip ci]
2021-10-05dfilter: Add some more syntax testsJoão Valverde1-0/+1
2021-10-01Docs+Packaging: Convert our man pages to Asciidoctor.Gerald Combs1-34/+36
Convert doc/*.pod to Asciidoctor. This: * Means we use the same markup for our man pages, the guides, and release notes. * Lets us add versions to our man pages. * Gives us more formatting options, e.g. AsciiDoc supports `commands`, nested lists and makes it easy to include version information. The manpage backend doesn't seem to support tables very well, unfortunately. Convert our CMake configuration to produce *roff and html man pages using Asciidoctor. Add a "manarg" block macro which makes our synopses wrap correctly. Similar to the release notes, guides, and FAQ, if Asciidoctor isn't found the man pages won't be generated or installed. Move Asciidoctor to the list of package build dependencies in various places. This commit includes the conversion script (pod2adoc.py), which will be removed later. Line count sanity check: Man page .pod .adoc androiddump 260 280 asn2deb 93 105 capinfos 401 471 captype 54 55 ciscodump 241 269 dftest 42 42 dpauxmon 153 169 dumpcap 464 534 editcap 528 583 etwdump 136 156 extcap 157 181 idl2deb 91 103 idl2wrs 120 100 mergecap 206 207 mmdbresolve 75 75 randpkt 107 111 randpktdump 158 184 rawshark 558 610 reordercap 76 78 sdjournal 145 157 sshdump 272 302 text2pcap 274 312 tshark 2135 2360 udpdump 133 151 wireshark-filter 486 479 wireshark 2967 3420
2021-09-30dfilter: Add test for "deprecated" tokensJoão Valverde1-0/+1
Tokens that are (so-called) deprecated produce a warning/hint to the user in the UI.
2021-09-29COSE dissector from dtn-wireshark projectBrian Sipos1-0/+1
2021-09-27Windows: Add preliminary support for MSYS2João Valverde1-34/+56
If we are using MSYS2 we use those packages to build Wireshark using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths. Fix GLib configuration. Disable copying of DLLs with MSYS2. Some tests in the suite_capture test suite are failing with MSYS MINGW64. That particular set of tests is way too brittle regarding file system paths; more work is needed to improve that situation.
2021-09-27CMake: Remove debian package targetJoão Valverde1-8/+0
This is more likely to hinder than to help, and is not really a good way to invoke dpkg-buildpackage. It's a crutch that doesn't interact well with ninja, has a 50/50 chance of giving the right results and will pollute the build environment. The Debian package should be built from a tarball instead.
2021-09-24CMake: The minizip URL is ancientJoão Valverde1-2/+2
Use something a bit more modern instead.
2021-09-22CMake: Try to set a required try_run() definition in a more idiomatic wayJoão Valverde1-0/+1
This is applicable to every test (if we had more), not just HAVE_C99_VSNPRINTF. Could also be a #define but let's go with this for now. This takes advantage of the stack based design of CMakePushCheckState.
2021-09-22CMake: Remove an unnecessary version checkJoão Valverde1-1/+1
MINGW implies WIN32 which implies CMake >= 3.13. Follow-up to 1dad8190b1ec4ab730de428437f2f6bbbf7ce345.
2021-09-22MinGW-w64: Need to use ANSI C stdioJoão Valverde1-0/+10
Defining _POSIX enables __USE_MINGW_ANSI_STDIO, this switches the stdio API from Microsoft to MinGW internal (ANSI C).
2021-09-22MinGW-w64: Fix windeployqt errorsJoão Valverde1-3/+1
--debug and --release flags are unnecessary and trigger errors. --pdb not supported and triggers a warning.
2021-09-22CMake: Target platform for WIN32 needs to be lower caseJoão Valverde1-4/+10
Capitalization matters here. We are now accepting this value from the environment so we need to lower case that string. Add an extra sanity check and status message for target CPU architecture to help detect mismatches.
2021-09-22CMake: Fix minimum version requirements for CentOS 8João Valverde1-10/+17
target_link_options() requires CMake >= 3.13.
2021-09-21MinGW-w64: Add guards for MSVC macro definitionsJoão Valverde1-0/+1
Add a comment too.
2021-09-21CMake: Move UNICODE defines to command lineJoão Valverde1-0/+5
For consistency's sake, I have not had any build errors that can be attributed to this.
2021-09-21MinGW-w64: Define NOMINMAX for Windows APIJoão Valverde1-3/+5
This seems relevant to MinGW-w64 from a quick look at the source.
2021-09-21MinGW-w64: Need to define WIN32_LEAN_AND_MEANJoão Valverde1-8/+9
2021-09-21MinGW-w64: Need to link using -municodeJoão Valverde1-0/+10
Some targets are not using unicode/WinMain (not sure why), so this really needs to be a per target setting (better anyway).
2021-09-20Windows: Don't search for a SpeexDSP packageJoão Valverde1-1/+5
2021-09-20CMake: Fix macro redefinition of Windows API versioningJoão Valverde1-0/+19
2021-09-20CMake: Add guards for PLATFORM sanity checkJoão Valverde1-14/+20
The sanity check is specific for Visual Studio so add those guards. The PLATFORM variable is not standard for other toolchains. Add a default "windows target platform" of Win64. Add error output for win-setup.ps1.
2021-09-20CMake: wsetargv.obj is specific to Visual StudioJoão Valverde1-2/+2
2021-09-13Tools: Migrate compress-pngs.sh to Python.Gerald Combs1-1/+0
Migrate compress-pngs from a Bash script that ran Make to a Python script, which should be usable on more platforms. Add Efficient Compression Tool (ect) to the list of compressors. Add the compressors to the various *-setup.sh scripts, but comment them out for now.
2021-09-13HTTP2, QUIC: fix "Follow Stream"Nardi Ivan1-0/+1
"Follow Stream" functionality assumes that all data in a single packet belongs to the same stream. That is not true for HTTP2 and QUIC, where we end up having data from unrelated streams. Filter out the unwanted data directly in the protocol dissector code with a custom `tap_handler` (as TCP already does). Close #16093
2021-09-11wiretap: Add zstd and lz4 as WTAP compression typesJohn Thacker1-3/+3
This has a few effects on the behavior of wtap_get_compression_type() and wtap_get_all_compression_type_extensions(): Make capinfos correctly report the compression type (instead of saying gzip compressed for zstd and lz4 compressed files). Makes files with the .zstd and .lz4 extension show up in the file chooser when "Files of type" is set to something other than "All Files", such as "All Capture Files" or "Wireshark/... pcapng" Makes the UI not default to gzip compression when saving a file compressed as zstd or lz4 (write support for zstd and lz4 doesn't exist yet, and the GUI doesn't have hooks for it anyway, though this can help as a prerequisite for later support for writing.) Also replace a couple of assert() with ws_assert(). Update the PURPOSE in CMakeLists for zstd and lz4 to note that they can be used to read compressed capture files.
2021-09-01CMake: Fix tests.Gerald Combs1-1/+1
Pass $<TARGET_FILE_DIR:wmem_test> to test.py, which should be the path for all of our built executables, instead of ...:tshark, which is the path for *some* of our built executables on macOS.
2021-09-01CMake: Get rid of WS_PROGRAM_PATHGerald Combs1-8/+1
Use the $<TARGET_FILE_DIR:tshark> generator expression instead.
2021-08-27Version: 3.5.0 → 3.5.1.Gerald Combs1-1/+1
2021-08-26cmake: add an "uninstall" target.Guy Harris1-0/+9
Based on the uninstall target I added to libpcap and tcpdump's CMake files. cmake_uninstall.cmake.in is BSD-licensed, so I can use it here and in libpcap/tcpdump without adding any GPL stuff to libpcap/tcpdump.
2021-07-26CMake: Make LTO default off, restrict to release buildJoão Valverde1-2/+2
Link Time Optimizations increases build time a lot so restrict this optimization to release builds. Follow our build bots and make this option default off. Also LTO requires CMake >= 3.9 so make the LTO CMake option universally conditional on that requirement.
2021-07-23CMake: Remove some unused definitionsJoão Valverde1-2/+0
2021-07-21CMake: Remove unneeded GLIB2_LIBRARIES.Gerald Combs1-2/+0
GLib is part of wsutil's link interface, so we don't need to link to it explictly.
2021-07-15CMake: Don't bother checking for fcntl.h or floorl.Gerald Combs1-5/+0
fcntl.h appears to be available on all of our supported platforms, including Windows. We've also been including it without HAVE_FCNTL_H guards in a few places (e.g. sshdump.c) without any issues for some time. floorl is part of C99.
2021-07-14CMake: Fixup qtui's includes.Gerald Combs1-7/+1
Add ${MINIZIP_INCLUDE_DIRS} to qtui's includes instead of every target's. Make more includes SYSTEM PRIVATE.
2021-07-14CMake: Fixup SpanDSP's TIFF includes.Gerald Combs1-1/+0
Add TIFF_INCLUDE_DIR to SPANDSP_INCLUDE_DIRS, but only if TIFF has been found. Ping #17477.
2021-07-14CMake: Adjust wsutil includes and linking.Gerald Combs1-3/+8
Mark wsutil's includes SYSTEM PRIVATE. This exposed a lot of targets that were indirectly picking up include paths via the wsutil target, so add direct includes where needed. The G.722 and G.726 codecs were implicilty including tiffio.h; find it explicitly instead. Mark some of wsutil's libraries PRIVATE, but leave commonly-used ones PUBLIC. Ping #17477.
2021-07-11wsutil: Start adding a test suiteJoão Valverde1-0/+1
2021-07-09Rename version.h to be more descriptiveJoão Valverde1-4/+4
Version.h is too generic. This is specific to VCSVERSION and that should be made more obvious and discoverable.
2021-07-05Revert "Wirehark Windows: Harden build with Shadow Stack and EHCONT metadata"Anders Broman1-13/+0
This reverts commit ebb8703a501f68394268d33988d76723df0178f0.
2021-07-04Move version_info.[ch] to ui/João Valverde1-35/+14
Version info is an aspect of UI implementation so move it to a more appropriate place, such as ui/. This also helps declutter the top-level. A static library is appropriate to encapsulate the dependencies as private and it is better supported by CMake than object libraries. Also version_info.h should not be installed as a public header.
2021-07-02Win32: Compile ui/win32 as C++.Gerald Combs1-2/+2
We always build the .c files in ui/win32 with Visual C++, so rename them to .cpp and update CMakeLists.txt to match. Leave the C code mostly intact for now, but this lets us take advantage of C++ features in the future if desired.
2021-06-28Wirehark Windows: Harden build with Shadow Stack and EHCONT metadataMoshe Kaplan1-0/+13
Compile and link with the /CETCOMPAT and /guard:ehcont flags on supported versions of Visual Studio
2021-06-24CMake: clear stale MaxMindDB cache entries if neededPeter Wu1-0/+1
On macOS with Homebrew, the version is included with the library path. On updates, the old MAXMINDDB_LIBRARY is invalidated. However ws_find_package only checks MaxMindDB_LIBRARY. Windows has a similar problem. Make sure to clear the stale value such that newer versions can be found, fixing the build. Fixes #17069
2021-06-17Replace usage of GLogLevel flags everywhereJoão Valverde1-1/+1
ws_log_domains.h needs to be included before wslog.h to be used to define WS_LOG_DOMAIN. Also the definition for enum ws_log_level needs to be exported for other APIs so move that to ws_log_domains.h and rename the file to ws_log_defs.h to reflect the new scope.
2021-06-17wslog: Use plain format with "message" levelJoão Valverde1-0/+2
Try out a simpler format with the default log level. Don't display process and file/function information with "message" level (experimental).
2021-06-14CMake: Remove -Wc++-compatJoão Valverde1-1/+0
Happy days are here again.
2021-06-11Refactor our logging and extend the wslog APIJoão Valverde1-1/+1
Experience has shown that: 1. The current logging methods are not very reliable or practical. A logging bitmask makes little sense as the user-facing interface (who would want debug but not crtical messages for example?); it's computer-friendly and user-unfriendly. More importantly the console log level preference is initialized too late in the startup process to be used for the logging subsystem and that fact raises a number of annoying and hard-to-fix usability issues. 2. Coding around G_MESSAGES_DEBUG to comply with our log level mask and not clobber the user's settings or not create unexpected log misses is unworkable and generally follows the principle of most surprise. The fact that G_MESSAGES_DEBUG="all" can leak to other programs using GLib is also annoying. 3. The non-structured GLib logging API is very opinionated and lacks configurability beyond replacing the log handler. 4. Windows GUI has some special code to attach to a console, but it would be nice to abstract away the rest under a single interface. 5. Using this logger seems to be noticeably faster. Deprecate the console log level preference and extend our API to implement a log handler in wsutil/wslog.h to provide easy-to-use, flexible and dependable logging during all execution phases. Log levels have a hierarchy, from most verbose to least verbose (debug to error). When a given level is set everything above that is also enabled. The log level can be set with an environment variable or a command line option (parsed as soon as possible but still later than the environment). The default log level is "message". Dissector logging is not included because it is not clear what log domain they should use. An explosion to thousands of domains is not desirable and putting everything in a single domain is probably too coarse and noisy. For now I think it makes sense to let them do their own thing using g_log_default_handler() and continue using the G_MESSAGES_DEBUG mechanism with specific domains for each individual dissector. In the future a mechanism may be added to selectively enable these domains at runtime while trying to avoid the problems introduced by G_MESSAGES_DEBUG.
2021-06-10CMake: Reverse logic to handle debug codeJoão Valverde1-1/+1
Only enabling debug code by default with Debug build type seems overly restrictive; debug output is still conditional on the log level.
2021-05-25epan: Add SMI versionJoão Valverde1-0/+5