summaryrefslogtreecommitdiff
path: root/cmake/libutils.cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@localhost.localdomain>2011-11-08 02:14:57 +0100
committerVladislav Vaintroub <wlad@localhost.localdomain>2011-11-08 02:14:57 +0100
commitc104d31404c68b5622dc676d53308d02349755d1 (patch)
treefc27ff74b43e14f071b523f99fa94475f70bd287 /cmake/libutils.cmake
parent216d5450e7b3f8455175c586b6fe73c0825dd89b (diff)
downloadmariadb-git-c104d31404c68b5622dc676d53308d02349755d1.tar.gz
For libmysqld.so, apply patch to the MySQL Bug#39288 found here
http://lists.mysql.com/commits/102373 It is better than previous attempts to build the libmysqld, as it also takes care of 1) -Wl,--no-undefined for shared libraries and 2) CLEAN_DIRECT_OUTPUT since there are now 2 libraries with the same base output name
Diffstat (limited to 'cmake/libutils.cmake')
-rw-r--r--cmake/libutils.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 6dbaaef57aa..93e8994b021 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -277,6 +277,15 @@ MACRO(MERGE_LIBRARIES)
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
ENDIF()
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
+ IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED)
+ # Do not allow undefined symbols in shared libraries
+ GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS)
+ IF(NOT TARGET_LINK_FLAGS)
+ SET(TARGET_LINK_FLAGS)
+ ENDIF()
+ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS
+ "${TARGET_LINK_FLAGS} ${LINK_FLAG_NO_UNDEFINED}")
+ ENDIF()
ENDMACRO()
FUNCTION(GET_DEPENDEND_OS_LIBS target result)