Commit Graph

11 Commits

Author SHA1 Message Date
João Valverde d1daf3fd10 CMake: Remove link test output line
The mode keyword STATUS needs to be capitalized, but this line is
mostly redundant with the check_c_source_compiles_output(), so
just remove it.

Change-Id: I7f29915a7ab2c4b5681e0159773d9216643f8a9c
Reviewed-on: https://code.wireshark.org/review/29524
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 22:33:00 +00:00
Joakim Karlsson 5994c902b4 cmake: remove warnings -Werror=old-style-definition
see https://cmake.org/Bug/bug_relationship_graph.php?bug_id=15058

Change-Id: I325f476b145a542e987a13bedd1f95a7d8faba94
Reviewed-on: https://code.wireshark.org/review/27121
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-24 19:19:23 +00:00
Martin Kaiser 4e95d5fa8e cmake: fix the linker flags test for Visual Studio
ddd1c87d43 modified the order
of linker command line options. This broke the tests and made
invalid linker flags seem valid.

(Link target) ->
  LINK : warning LNK4044: unrecognized option '/Wl,--as-needed'; ignored [C:\wireshark\build3\wsutil\wsutil.vcxproj]
  LINK : warning LNK4044: unrecognized option '/pie'; ignored [C:\wireshark\build3\wsutil\wsutil.vcxproj]

The simple fix is to add specific options for Visual Studio and clang at the beginning of
the linker's command line options rather than at the end.

Change-Id: I6492ea1271e18be0d190e7579f47baecf6ac4d61
Reviewed-on: https://code.wireshark.org/review/18709
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-11-08 16:22:30 +00:00
Martin Kaiser ddd1c87d43 cmake: avoid leading space in linker options
This causes problems with cmake 2.8.9, which ships with Debian Wheezy.

Reorder the linker options to avoid a leading space. According to GNU
ld's manual, the order of linker options on the command line does not
matter. This should be the same for Visual Studio's cl.exe and for
clang's linker.

See
https://www.wireshark.org/lists/wireshark-dev/201604/msg00141.html
for more details about the problem.

Change-Id: Ieaf7425600d394f365b01747747665233693fea2
Reviewed-on: https://code.wireshark.org/review/18581
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2016-11-07 21:16:30 +00:00
David Morsberger da5594744e Get Clang to report errors for unused vs. unknown linker flags
Change-Id: Iabe497d88239c1e15d7ef6d44c6fca79c8be2d1c
Reviewed-on: https://code.wireshark.org/review/13569
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-28 02:44:14 +00:00
Guy Harris 8049df7943 Get Clang to report errors for unknown linker flags.
Change-Id: Id8e77b6b521acc1ba684823211d6c09d0e5c111c
Reviewed-on: https://code.wireshark.org/review/13566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 18:27:55 +00:00
Guy Harris 54e3b32027 Don't treat Visual Studio specially for linker flags.
Have CHECK_C_LINKER_FLAG pass /WX to the linker if we're using MSVC, to
force the link to fail if the linker doesn't recognize the flag.

Add flags to WIRESHARK_LD_FLAGS even with MSVC; let CHECK_C_LINKER_FLAG
figure out whether the flag should be used.

While we're at it, fix CHECK_C_LINKER_FLAG to save and restore
CMAKE_REQUIRED_LIBRARIES.

Change-Id: I7f73b4cc3a28eb14e46c2e1e9ad69f5303754f01
Reviewed-on: https://code.wireshark.org/review/13558
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 05:24:50 +00:00
Guy Harris dc91ac5241 Make CHECK_C_LINKER_FLAG work with, at least, the Xcode generator.
As per a suggestion from a Kitware person in bug 0015934:

	https://cmake.org/Bug/view.php?id=15934

We also don't need to check whether the resulting code *runs* -
check_c_source_compiles not only compiles, it links as well.

Change-Id: Ied09b9da7c88ac46f14df14f6a6260037abdbef4
Reviewed-on: https://code.wireshark.org/review/13556
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 00:55:07 +00:00
Jörg Mayer eb1fdd0f27 - Reset a few more variables used in FindXYZ scripts.
- README.cmake: small update.
- Set a variable before using it for installation.

svn path=/trunk/; revision=34274
2010-09-28 19:23:15 +00:00
Stig Bjørlykke b54d0a2ed9 Reset CMAKE_REQUIRED_FLAGS after checking flags.
svn path=/trunk/; revision=34233
2010-09-24 10:23:55 +00:00
Jörg Mayer 96779de920 cmake changes:
- Add checking for linker flags
- Install plugins with the name including the Wireshark version.
  This will make it easier to find matching plugin versions if
  files get just copied over.


svn path=/trunk/; revision=32231
2010-03-18 10:27:17 +00:00