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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3e48269f
Commit
3e48269f
authored
May 21, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git support in cmake files
parent
05df71ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
6 deletions
+35
-6
cmake/cpack_source_ignore_files.cmake
cmake/cpack_source_ignore_files.cmake
+2
-0
cmake/info_macros.cmake.in
cmake/info_macros.cmake.in
+16
-3
cmake/make_dist.cmake.in
cmake/make_dist.cmake.in
+16
-2
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-1
No files found.
cmake/cpack_source_ignore_files.cmake
View file @
3e48269f
...
...
@@ -17,6 +17,8 @@ SET(CPACK_SOURCE_IGNORE_FILES
\\\\.bzr/
\\\\.bzr-mysql
\\\\.bzrignore
\\\\.git/
\\\\.gitignore
CMakeCache\\\\.txt
cmake_dist\\\\.cmake
CPackSourceConfig\\\\.cmake
...
...
cmake/info_macros.cmake.in
View file @
3e48269f
...
...
@@ -14,7 +14,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Handle/create the "INFO_*" files describing a M
ySQL
(server) binary.
# Handle/create the "INFO_*" files describing a M
ariaDB
(server) binary.
# This is part of the fix for bug#42969.
...
...
@@ -28,6 +28,7 @@ SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
SET(CMAKE_SIZEOF_VOID_P "@CMAKE_SIZEOF_VOID_P@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@")
SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@")
SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@")
...
...
@@ -54,7 +55,19 @@ MACRO(CREATE_INFO_SRC target_dir)
FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
# to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
# For better readability ...
FILE(APPEND ${INFO_SRC} "\nMySQL source ${VERSION}\n")
FILE(APPEND ${INFO_SRC} "\nMariaDB source ${VERSION}\n")
ELSEIF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Sources are in a GIT repository: Always update.
EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} log -1 "--format=commit: %H%nauthor: %an <%ae>%ndate: %aD%nbranch: %d"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_INFO
RESULT_VARIABLE RESULT
)
FILE(WRITE ${INFO_SRC} "${VERSION_INFO}\n")
# to debug, add: FILE(APPEND ${INFO_SRC} "\nResult ${RESULT}\n")
# For better readability ...
FILE(APPEND ${INFO_SRC} "\nMariaDB source ${VERSION}\n")
ELSEIF(EXISTS ${INFO_SRC})
# Outside a BZR tree, there is no need to change an existing "INFO_SRC",
# it cannot be improved.
...
...
@@ -69,7 +82,7 @@ MACRO(CREATE_INFO_SRC target_dir)
FILE(WRITE ${INFO_SRC} "${SOURCE_INFO}\n")
ELSE()
# This is a fall-back.
FILE(WRITE ${INFO_SRC} "\nM
ySQL
source ${VERSION}\n")
FILE(WRITE ${INFO_SRC} "\nM
ariaDB
source ${VERSION}\n")
ENDIF()
ENDMACRO(CREATE_INFO_SRC)
...
...
cmake/make_dist.cmake.in
View file @
3e48269f
...
...
@@ -23,6 +23,7 @@ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
SET(GIT_EXECUTABLE "@GIT_EXECUTABLE@")
SET(GTAR_EXECUTABLE "@GTAR_EXECUTABLE@")
SET(TAR_EXECUTABLE "@TAR_EXECUTABLE@")
SET(CMAKE_GENERATOR "@CMAKE_GENERATOR@")
...
...
@@ -39,7 +40,20 @@ SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME})
FILE(REMOVE_RECURSE ${PACKAGE_DIR})
FILE(REMOVE ${PACKAGE_DIR}.tar.gz )
IF(BZR_EXECUTABLE)
IF(GIT_EXECUTABLE)
MESSAGE(STATUS "Running git checkout-index")
EXECUTE_PROCESS(
COMMAND "${GIT_EXECUTABLE}" checkout-index --all --prefix=${PACKAGE_DIR}/
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
RESULT_VARIABLE RESULT
)
IF(NOT RESULT EQUAL 0)
SET(GIT_EXECUTABLE)
ENDIF()
ENDIF()
IF(BZR_EXECUTABLE AND NOT GIT_EXECUTABLE)
MESSAGE(STATUS "Running bzr export")
EXECUTE_PROCESS(
COMMAND "${BZR_EXECUTABLE}" export
...
...
@@ -53,7 +67,7 @@ IF(BZR_EXECUTABLE)
ENDIF()
ENDIF()
IF(NOT BZR_EXECUTABLE)
IF(NOT BZR_EXECUTABLE
AND NOT GIT_EXECUTABLE
)
MESSAGE(STATUS "bzr not found or source dir is not a repo, use CPack")
IF(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
...
...
sql/CMakeLists.txt
View file @
3e48269f
...
...
@@ -254,7 +254,7 @@ IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
ENDIF
()
FOREACH
(
tool glibtoolize libtoolize aclocal autoconf autoheader automake gtar
tar bzr
)
tar bzr
git
)
STRING
(
TOUPPER
${
tool
}
TOOL
)
FIND_PROGRAM
(
${
TOOL
}
_EXECUTABLE
${
tool
}
DOC
"path to the executable"
)
MARK_AS_ADVANCED
(
${
TOOL
}
_EXECUTABLE
)
...
...
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