Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
9905949b
Commit
9905949b
authored
Sep 14, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix usage of GET_TARGET_PROPERTY
and followup fixes
parent
27329aac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
cmake/libutils.cmake
cmake/libutils.cmake
+8
-4
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-1
No files found.
cmake/libutils.cmake
View file @
9905949b
...
...
@@ -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
}
)
...
...
@@ -240,11 +244,11 @@ MACRO(MERGE_LIBRARIES)
# check for non-PIC libraries
IF
(
NOT _SKIP_PIC
)
FOREACH
(
LIB
${
LIBS
}
)
GET_TARGET_PROPERTY
(
${
LIB
}
TYPE LIB
TYPE
)
IF
(
L
IB
TYPE 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
"
...
...
sql/CMakeLists.txt
View file @
9905949b
...
...
@@ -181,7 +181,7 @@ DTRACE_INSTRUMENT_STATIC_LIBS(mysqld
SET
(
WITH_MYSQLD_LDFLAGS
""
CACHE STRING
"Additional linker flags for mysqld"
)
MARK_AS_ADVANCED
(
WITH_MYSQLD_LDFLAGS
)
IF
(
WITH_MYSQLD_LDFLAGS
)
GET_TARGET_PROPERTY
(
mysqld LINK_FLAGS MYSQLD_
LINK_FLAGS
)
GET_TARGET_PROPERTY
(
MYSQLD_LINK_FLAGS mysqld
LINK_FLAGS
)
IF
(
NOT MYSQLD_LINK_FLAGS
)
SET
(
MYSQLD_LINK_FLAGS
)
ENDIF
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment