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
45625de0
Commit
45625de0
authored
Oct 06, 2014
by
Leif Walsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed cmake warnings for 3.0.0
parent
24ba2c4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
22 deletions
+24
-22
cmake/merge_archives_unix.cmake.in
cmake/merge_archives_unix.cmake.in
+3
-5
cmake_modules/TokuMergeLibs.cmake
cmake_modules/TokuMergeLibs.cmake
+21
-17
No files found.
cmake/merge_archives_unix.cmake.in
View file @
45625de0
...
...
@@ -16,9 +16,7 @@
# This script merges many static libraries into
# one big library on Unix.
SET(TARGET_LOCATION "@TARGET_LOCATION@")
SET(TARGET "@TARGET@")
SET(STATIC_LIBS "@STATIC_LIBS@")
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@")
SET(CMAKE_AR "@CMAKE_AR@")
SET(CMAKE_RANLIB "@CMAKE_RANLIB@")
...
...
@@ -30,7 +28,7 @@ MAKE_DIRECTORY(${TEMP_DIR})
# clashes) Since the lib may contain objects with the same name, we first
# list the archive contents, then uniquify the object names as we extract
# them.
FOREACH(LIB ${STATIC_LIBS})
FOREACH(LIB ${STATIC_LIB
_FILE
S})
GET_FILENAME_COMPONENT(NAME_NO_EXT ${LIB} NAME_WE)
SET(TEMP_SUBDIR ${TEMP_DIR}/${NAME_NO_EXT})
MAKE_DIRECTORY(${TEMP_SUBDIR})
...
...
@@ -87,10 +85,10 @@ FOREACH(OBJ ${OBJECTS})
SET(ALL_OBJECTS ${ALL_OBJECTS} ${OBJ})
ENDFOREACH()
FILE(TO_NATIVE_PATH ${TARGET_
LOCATION} ${TARGET_LOCATION}
)
FILE(TO_NATIVE_PATH ${TARGET_
FILE} TARGET_FILE
)
# Now pack the objects into library with ar.
EXECUTE_PROCESS(
COMMAND ${CMAKE_AR} rcs ${TARGET_
LOCATION
} ${ALL_OBJECTS}
COMMAND ${CMAKE_AR} rcs ${TARGET_
FILE
} ${ALL_OBJECTS}
WORKING_DIRECTORY ${TEMP_DIR}
)
...
...
cmake_modules/TokuMergeLibs.cmake
View file @
45625de0
...
...
@@ -27,17 +27,12 @@ MACRO(TOKU_MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
SET
(
OSLIBS
)
FOREACH
(
LIB
${
LIBS_TO_MERGE
}
)
GET_TARGET_PROPERTY
(
LIB_LOCATION
${
LIB
}
LOCATION
)
GET_TARGET_PROPERTY
(
LIB_TYPE
${
LIB
}
TYPE
)
IF
(
NOT LIB_LOCATION
)
# 3rd party library like libz.so. Make sure that everything
# that links to our library links to this one as well.
LIST
(
APPEND OSLIBS
${
LIB
}
)
ELSE
()
IF
(
TARGET
${
LIB
}
)
# This is a target in current project
# (can be a static or shared lib)
GET_TARGET_PROPERTY
(
LIB_TYPE
${
LIB
}
TYPE
)
IF
(
LIB_TYPE STREQUAL
"STATIC_LIBRARY"
)
SET
(
STATIC_LIBS
${
STATIC_LIBS
}
${
LIB_LOCATION
}
)
LIST
(
APPEND STATIC_LIBS
${
LIB
}
)
ADD_DEPENDENCIES
(
${
TARGET
}
${
LIB
}
)
# Extract dependend OS libraries
TOKU_GET_DEPENDEND_OS_LIBS
(
${
LIB
}
LIB_OSLIBS
)
...
...
@@ -46,6 +41,10 @@ MACRO(TOKU_MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
# This is a shared library our static lib depends on.
LIST
(
APPEND OSLIBS
${
LIB
}
)
ENDIF
()
ELSE
()
# 3rd party library like libz.so. Make sure that everything
# that links to our library links to this one as well.
LIST
(
APPEND OSLIBS
${
LIB
}
)
ENDIF
()
ENDFOREACH
()
IF
(
OSLIBS
)
...
...
@@ -65,19 +64,21 @@ MACRO(TOKU_MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
# To merge libs, just pass them to lib.exe command line.
SET
(
LINKER_EXTRA_FLAGS
""
)
FOREACH
(
LIB
${
STATIC_LIBS
}
)
SET
(
LINKER_EXTRA_FLAGS
"
${
LINKER_EXTRA_FLAGS
}
$
{
LIB
}
"
)
SET
(
LINKER_EXTRA_FLAGS
"
${
LINKER_EXTRA_FLAGS
}
$
<TARGET_FILE:
${
LIB
}
>
"
)
ENDFOREACH
()
SET_TARGET_PROPERTIES
(
${
TARGET
}
PROPERTIES STATIC_LIBRARY_FLAGS
"
${
LINKER_EXTRA_FLAGS
}
"
)
ELSE
()
GET_TARGET_PROPERTY
(
TARGET_LOCATION
${
TARGET
}
LOCATION
)
FOREACH
(
STATIC_LIB
${
STATIC_LIBS
}
)
LIST
(
APPEND STATIC_LIB_FILES $<TARGET_FILE:
${
STATIC_LIB
}
>
)
ENDFOREACH
()
IF
(
APPLE
)
# Use OSX's libtool to merge archives (ihandles universal
# binaries properly)
ADD_CUSTOM_COMMAND
(
TARGET
${
TARGET
}
POST_BUILD
COMMAND rm
$
{
TARGET_LOCATION
}
COMMAND /usr/bin/libtool -static -o
$
{
TARGET_LOCATION
}
${
STATIC_LIBS
}
COMMAND rm $
<TARGET_FILE:
${
TARGET
}
>
COMMAND /usr/bin/libtool -static -o $
<TARGET_FILE:
${
TARGET
}
>
${
STATIC_LIB
_FILE
S
}
)
ELSE
()
# Generic Unix, Cygwin or MinGW. In post-build step, call
...
...
@@ -88,11 +89,14 @@ MACRO(TOKU_MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
${
TOKU_CMAKE_SCRIPT_DIR
}
/merge_archives_unix.cmake.in
${
CMAKE_CURRENT_BINARY_DIR
}
/merge_archives_
${
TARGET
}
.cmake
@ONLY
)
)
STRING
(
REGEX REPLACE
";"
"
\\\;
"
STATIC_LIB_FILES
"
${
STATIC_LIB_FILES
}
"
)
ADD_CUSTOM_COMMAND
(
TARGET
${
TARGET
}
POST_BUILD
COMMAND rm
${
TARGET_LOCATION
}
COMMAND
${
CMAKE_COMMAND
}
-P
${
CMAKE_CURRENT_BINARY_DIR
}
/merge_archives_
${
TARGET
}
.cmake
COMMAND rm $<TARGET_FILE:
${
TARGET
}
>
COMMAND
${
CMAKE_COMMAND
}
-D TARGET_FILE=$<TARGET_FILE:
${
TARGET
}
>
-D STATIC_LIB_FILES=
"
${
STATIC_LIB_FILES
}
"
-P
${
CMAKE_CURRENT_BINARY_DIR
}
/merge_archives_
${
TARGET
}
.cmake
DEPENDS
"
${
CMAKE_CURRENT_BINARY_DIR
}
/merge_archives_
${
TARGET
}
.cmake"
)
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