diff options
author | Vladislav Vaintroub <vvaintroub@koala> | 2009-12-07 02:16:05 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@koala> | 2009-12-07 02:16:05 +0100 |
commit | 9fcef3c45bd936b7da20679a1bb160c22f4945ff (patch) | |
tree | be34c035a12551aff48f3bcdb4fcbf4754f8b3f0 /libmysql | |
parent | 2e6270311467f557a424a15b03d8d52c5b0ea92d (diff) | |
download | mariadb-git-9fcef3c45bd936b7da20679a1bb160c22f4945ff.tar.gz |
On Linux, support -Wl,--no-undefined (only client shared library)
and --Wl,--as-needed (all shared modules). The later will remove
unused dependencies (also from gcc and C++ runtime)
Diffstat (limited to 'libmysql')
-rwxr-xr-x | libmysql/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index efd6d553be4..db7d2ee2468 100755 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -167,7 +167,14 @@ IF(NOT DISABLE_SHARED) OUTPUT_NAME mysqlclient VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0" SOVERSION "${SHARED_LIB_MAJOR_VERSION}") - + IF(LINK_FLAG_NO_UNDEFINED) + GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS) + IF(NOT libmysql_link_flag) + SET(libmysql_link_flags) + ENDIF() + SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS + "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}") + ENDIF() # clean direct output needs to be set several targets have the same name #(mysqlclient in this case) SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1) |