Don't treat Visual Studio specially for linker flags.
authorGuy Harris <guy@alum.mit.edu>
Wed, 27 Jan 2016 03:13:44 +0000 (19:13 -0800)
committerGuy Harris <guy@alum.mit.edu>
Wed, 27 Jan 2016 05:24:50 +0000 (05:24 +0000)
commit54e3b32027f1b28cc9871b5ff35c358eaf8cd05f
treebe8de4fd8e88d24eff55ce737941b1ff0bbf2545
parent59bdb4bcb6fa8deea4bdd0cbf1940acc11ef5f4d
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>
CMakeLists.txt
cmake/modules/CheckCLinkerFlag.cmake