1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-25 03:41:56 +03:00

Link shared libraries with --as-needed by default.

This commit is contained in:
Andreas Schneider
2009-08-25 15:06:56 +02:00
parent 324be0eabd
commit b8508020e5

View File

@ -46,10 +46,13 @@ if (UNIX AND NOT WIN32)
if (WITH_FORTIFY_SOURCE)
add_definitions(-D_FORTIFY_SOURCE=2)
endif (WITH_FORTIFY_SOURCE)
# Set linker flags
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
endif (CMAKE_COMPILER_IS_GNUCC)
endif (UNIX AND NOT WIN32)
# suppress warning about "deprecated" functions
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC)
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif (MSVC)