summaryrefslogtreecommitdiff
path: root/cmake/libutils.cmake
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-11-06 09:40:39 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-11-06 09:40:39 +0200
commitdf563e0c037f9b2cdb22e145575f92a121b4b529 (patch)
tree31d39796cebcef916eb7e0888537c18f946170ff /cmake/libutils.cmake
parente058a251c10350f3727ca1df022dc5786933535b (diff)
parentbdfe2784d5b73a1fdcdacb3d9adcc9dc71af344b (diff)
downloadmariadb-git-df563e0c037f9b2cdb22e145575f92a121b4b529.tar.gz
Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
Diffstat (limited to 'cmake/libutils.cmake')
-rw-r--r--cmake/libutils.cmake12
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index cdc7af5d228..b5220ddd546 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -136,6 +136,10 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
SET(SOURCE_FILE ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_depends.c)
ADD_LIBRARY(${TARGET} STATIC ${SOURCE_FILE})
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
+ IF(NOT _SKIP_PIC)
+ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS
+ "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+ ENDIF()
SET(OSLIBS)
FOREACH(LIB ${LIBS_TO_MERGE})
@@ -239,11 +243,11 @@ MACRO(MERGE_LIBRARIES)
# check for non-PIC libraries
IF(NOT _SKIP_PIC)
FOREACH(LIB ${LIBS})
- GET_TARGET_PROPERTY(${LIB} TYPE LIBTYPE)
- IF(LIBTYPE STREQUAL "STATIC_LIBRARY")
- GET_TARGET_PROPERTY(LIB COMPILE_FLAGS LIB_COMPILE_FLAGS)
+ GET_TARGET_PROPERTY(LTYPE ${LIB} TYPE)
+ IF(LTYPE STREQUAL "STATIC_LIBRARY")
+ GET_TARGET_PROPERTY(LIB_COMPILE_FLAGS ${LIB} COMPILE_FLAGS)
STRING(REPLACE "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
- "<PIC_FLAG>" LIB_COMPILE_FLAGS ${LIB_COMPILE_FLAG})
+ "<PIC_FLAG>" LIB_COMPILE_FLAGS "${LIB_COMPILE_FLAGS}")
IF(NOT LIB_COMPILE_FLAGS MATCHES "<PIC_FLAG>")
MESSAGE(FATAL_ERROR
"Attempted to link non-PIC static library ${LIB} to shared library ${TARGET}\n"