0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-19 20:02:18 +02:00

Add linker flags only on Linux.

This commit is contained in:
Felix Geyer 2011-11-12 01:48:49 +01:00
parent e366daf3ce
commit 2e84c96ab7

View File

@ -23,10 +23,6 @@ option(WITH_TESTS "Enable building of unit tests" ON)
set( KEEPASSX_VERSION "0.9.0" )
if ( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
set (SOLARIS true)
endif( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -fno-common -fno-exceptions -fno-rtti")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_KEYWORDS -DQT_NO_EXCEPTIONS -DQT_NO_STL -DQT_STRICT_ITERATORS")
@ -38,9 +34,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wwrite-strings -Wformat-security -Werror-implicit-function-declaration")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -Wno-long-long")
if( UNIX AND NOT APPLE AND NOT SOLARIS )
if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined" )
endif( UNIX AND NOT APPLE AND NOT SOLARIS)
endif( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
endif(CMAKE_COMPILER_IS_GNUCXX)
if( APPLE OR MINGW )