Commit Graph

25 Commits

Author SHA1 Message Date
João Valverde 613331f07b dfilter: Disable flex debug trace for release builds
This omits the flex debug code in the binary if the build type is
RelMinSize or Release.

It replaces the "%option debug" stanza with the -d command line
option, to be able to configure the flex behaviour.
2023-01-09 04:03:19 +00:00
Peter Wu aac30ba2d1 CMake,WSDG: Remove Cygwin support
Declare Cygwin as unsupported and remove all supporting code. Simplify
some Chocolatey notes in the WSDG.

Remove FindPerl.cmake as it only existed to force use of Wireshark's
bundled FindCygwin.cmake (bug 13922). FindXSLTPROC.cmake special
handling for Cygwin was also removed, in theory this could cause issues
when the PATH contains a Cygwin xsltproc, but it's unsupported anyway.

Change-Id: Iabfac2b4a9fd930530505d27bdba618bdb8f7f34
Reviewed-on: https://code.wireshark.org/review/31452
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09 04:21:50 +00:00
Gerald Combs f52bb2bf27 CMake: Fixup our Chocolatey bin path discovery.
Search for choco.exe directly instead of using PATHS + PATH_SUFFIXES.
Look in %ChocolateyInstall%\bin first. CHOCOLATEY_BIN_PATH is the binary
path. There's no need to append /bin to it.

Change-Id: I732db398bd989bf12222a5cee2c79c0bd4161638
Reviewed-on: https://code.wireshark.org/review/26276
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 19:00:56 +00:00
Peter Wu 46b105d513 Remove runlex.sh script, just run lex directly
This removes the need for sh (and Cygwin) on Windows to build Wireshark.

runlex.sh (added in commits 5be4499a and 517d6d57) was added because
older flex had quirks with its options (and the --header(-file) option
was not available). The minimum required flex version for reentrant
scanners (2.5.6) does not have these issues though, so remove the step.

Change-Id: I73c82bb329e2130481efca94809dc60b86dcbafe
Reviewed-on: https://code.wireshark.org/review/21315
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-04-26 21:51:18 +00:00
Mark Phillips 64f83641ad Cleanup runlex.sh to use builtin POSIX functions instead of sed
Bug: 13412

Change-Id: If43b30a33dcc4f23ba2bcb3cce3d0feea0d9fe40
Reviewed-on: https://code.wireshark.org/review/20120
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-02-15 20:58:43 +00:00
Graham Bloice 7514f98f56 Make Winflex\bison the preferred option
Cygwin flex\bison generate shortening warnings due to size_t on
Win 64.  The win flex\bison versions don't so find them first.

Change-Id: Ib68c84435f859325612410b72b6cf21cf106ecc2
Reviewed-on: https://code.wireshark.org/review/17763
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-09-18 09:57:06 +00:00
Graham Bloice 2e23b506c7 Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.

On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj

Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-05-02 12:01:24 +00:00
Guy Harris 59816ef00c Make the Flex scanners and YACC parser in libraries reentrant.
master-branch libpcap now generates a reentrant Flex scanner and
Bison/Berkeley YACC parser for capture filter expressions, so it
requires versions of Flex and Bison/Berkeley YACC that support that.

We might as well do the same.  For libwiretap, it means we could
actually have multiple K12 text or Ascend/Lucent text files open at the
same time.  For libwireshark, it might not be as useful, as we only read
configuration files at startup (which should only happen once, in one
thread) or on demand (in which case, if we ever support multiple threads
running libwireshark, we'd need a mutex to ensure that only one file
reads it), but it's still the right thing to do.

We also require a version of Flex that can write out a header file, so
we change the runlex script to generate the header file ourselves. This
means we require a version of Flex new enough to support --header-file.

Clean up some other stuff encountered in the process.

Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16
Reviewed-on: https://code.wireshark.org/review/14719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-03 22:21:29 +00:00
Gerald Combs 714fa85d85 Win flex-bison and Chocolatey updates.
Chocolatey's latest winflexbison package is usable. Update
config.nmake, FindLEX.cmake, and FindYACC.cmake accordingly.  Rename
CHOCOLATEY_INSTALL_PATH to CHOCOLATEY_BIN_PATH since that's what we're
finding.

Change-Id: I39973fba0531b3f7a1315ca010a8bd70581db3fb
Reviewed-on: https://code.wireshark.org/review/3479
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-08-07 21:54:54 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Gerald Combs fae3157f04 Look for win_flex and win_bison.
svn path=/trunk/; revision=54830
2014-01-16 20:15:20 +00:00
Gerald Combs 8db4bc2499 More Chocolatey lex/yacc updates.
Add Windows-style path handling to runlex.sh. Update the example
Chocolatey LEX path accordingly. This lets us use path information in
LEX and have it work in both nmake and runlex.sh

Add a FindChocolatey.cmake module. Update FindLEX and FindYACC to use it.
The code is currently untested and commented out.

svn path=/trunk/; revision=54828
2014-01-16 18:57:29 +00:00
Jörg Mayer 117a59d7a2 Pass the name of the sed executable as an explicit argurment to
runlex.sh (like it is done with LEX already). May fix a problem
on Windows with cmake.

svn path=/trunk/; revision=53059
2013-11-03 12:22:39 +00:00
Jörg Mayer 150fb747a6 Make runlex.sh work on Windows
svn path=/trunk/; revision=52373
2013-10-04 23:23:16 +00:00
Jörg Mayer 21bfea7309 Looks like we have problems invoking shell scripts from
cmake on windows - so explicitely run the shell with the
script as argument

svn path=/trunk/; revision=52372
2013-10-04 22:18:57 +00:00
Jörg Mayer a7f7ada049 cmake stuff:
- Fix fallout from gtk/text_import_scanner.l patch: Wireshark will
  build with cmake again.
- Update README.cmake a bit
- Running "cmake -DUI_MANAGER=ON" will give you the new ui-manager.


svn path=/trunk/; revision=34885
2010-11-15 20:25:28 +00:00
Jörg Mayer c131599cf7 Slightly rework the detection code for some packages.
Make compile flag detection work (needed some not so nice hacks).

svn path=/trunk/; revision=30129
2009-09-24 20:42:08 +00:00
Jörg Mayer 878d7246b8 - Add $Id: $ tags
- FindHtmlViewer.cmake: Try to add reading the name of the
  html viewer from the HTML_VIEWER environment variable (untested)

svn path=/trunk/; revision=30104
2009-09-23 19:40:25 +00:00
Jörg Mayer 9500e97cb3 - Undo the PACKAGELIST WSWIN32 stuff in CMakeLists.txt:
That's what the packages are for, so instead of creating
  WSWIN32, the stuff should probably go into the GLIB2
  package.
- libwireshark now compiles - no time to add linking with
  it until tonight


svn path=/trunk/; revision=29756
2009-09-07 07:26:43 +00:00
Kovarththanan Rajaratnam da7f3462eb Fix PATH typo. Should have been PATHS
svn path=/trunk/; revision=29620
2009-08-30 06:18:43 +00:00
Jörg Mayer 67d508edaf OK, so my last commit message was too optimistic - I was using
an installed version of wsutil. dumpcap now really builds on
Linux via cmake.

svn path=/trunk/; revision=28754
2009-06-16 04:12:30 +00:00
Jörg Mayer d3fcd1a09b CMake now successfully builds dumpcap
svn path=/trunk/; revision=28745
2009-06-15 18:59:33 +00:00
Jörg Mayer 18887f7b72 Resume work on CMake for Wireshark. Finally found and fixed a
few mistakes that I made earlier.

Current status: dumpcap still doesn't build
Next step: Add a ylwrap like workaround for flex misbehaviour.

svn path=/trunk/; revision=28518
2009-05-29 10:57:47 +00:00
Jörg Mayer e8a5a41045 Parts of http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1179
Frederic Heem:
* More cmake system checks. It compiles dumpcap without running configure,

svn path=/trunk/; revision=19672
2006-10-24 17:39:32 +00:00
Jörg Mayer d6417e0842 cmake/
Add some more (hackish) tests.
	Add a LICENSE file until I find the time to add it to all
	files individually.

CMakeLists.txt
	Add some addiotional stuff regarding options.
	Add (non-working) code to generate config.h
	Handle GTK1 vs GTK2 and GLIB1 vs GLIB2

svn path=/trunk/; revision=19168
2006-09-06 22:28:19 +00:00