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
83ce12ba
Commit
83ce12ba
authored
May 12, 2011
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows build : Make win\config.js optional in 5.1
Simplifies handling 5.1 in buildbot.
parent
1c952545
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
1 deletion
+92
-1
CMakeLists.txt
CMakeLists.txt
+92
-1
No files found.
CMakeLists.txt
View file @
83ce12ba
...
...
@@ -21,7 +21,98 @@ ENDIF(COMMAND cmake_policy)
PROJECT
(
MySql
)
# This reads user configuration, generated by configure.js.
INCLUDE
(
win/configure.data
)
INCLUDE
(
win/configure.data OPTIONAL
)
MACRO
(
MYSQL_GET_CONFIG_VALUE keyword var
)
IF
(
NOT
${
var
}
)
IF
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/configure.in
)
FILE
(
STRINGS
${
CMAKE_SOURCE_DIR
}
/configure.in str REGEX
"^[ ]*
${
keyword
}
="
)
IF
(
str
)
STRING
(
REPLACE
"
${
keyword
}
="
""
str
${
str
}
)
STRING
(
REGEX REPLACE
"[ ].*"
""
str
${
str
}
)
SET
(
${
var
}
${
str
}
CACHE INTERNAL
"Config variable"
)
ENDIF
()
ENDIF
()
ENDIF
()
ENDMACRO
()
# Read mysql version for configure script
MACRO
(
GET_MYSQL_VERSION
)
IF
(
NOT VERSION_STRING
)
IF
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/configure.in
)
FILE
(
STRINGS
${
CMAKE_SOURCE_DIR
}
/configure.in str REGEX
"AM_INIT_AUTOMAKE"
)
STRING
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+
\\
.[0-9]+[-][^
\\
)]+"
VERSION_STRING
"
${
str
}
"
)
IF
(
NOT VERSION_STRING
)
STRING
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+
\\
.[0-9]+"
VERSION_STRING
"
${
str
}
"
)
IF
(
NOT VERSION_STRING
)
FILE
(
STRINGS configure.in str REGEX
"AC_INIT
\\
("
)
STRING
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+
\\
.[0-9]+[-][a-zA-Z0-9]+"
VERSION_STRING
"
${
str
}
"
)
IF
(
NOT VERSION_STRING
)
STRING
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+
\\
.[0-9]+"
VERSION_STRING
"
${
str
}
"
)
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
ENDIF
()
IF
(
NOT VERSION_STRING
)
MESSAGE
(
FATAL_ERROR
"VERSION_STRING cannot be parsed, please specify -DVERSION_STRING=major.minor.patch-extra"
"when calling cmake"
)
ENDIF
()
SET
(
VERSION
${
VERSION_STRING
}
)
STRING
(
REPLACE
"-"
"_"
MYSQL_U_SCORE_VERSION
"
${
VERSION_STRING
}
"
)
# Remove trailing (non-numeric) part of the version string
STRING
(
REGEX REPLACE
"[^
\\
.0-9].*"
""
VERSION_STRING
${
VERSION_STRING
}
)
STRING
(
REGEX REPLACE
"([0-9]+)
\\
.[0-9]+
\\
.[0-9]+"
"
\\
1"
MAJOR_VERSION
"
${
VERSION_STRING
}
"
)
STRING
(
REGEX REPLACE
"[0-9]+
\\
.([0-9]+)
\\
.[0-9]+"
"
\\
1"
MINOR_VERSION
"
${
VERSION_STRING
}
"
)
STRING
(
REGEX REPLACE
"[0-9]+
\\
.[0-9]+
\\
.([0-9]+)"
"
\\
1"
PATCH
"
${
VERSION_STRING
}
"
)
SET
(
MYSQL_BASE_VERSION
"
${
MAJOR_VERSION
}
.
${
MINOR_VERSION
}
"
CACHE INTERNAL
"MySQL Base version"
)
SET
(
MYSQL_NO_DASH_VERSION
"
${
MAJOR_VERSION
}
.
${
MINOR_VERSION
}
.
${
PATCH
}
"
)
MATH
(
EXPR MYSQL_VERSION_ID
"10000*
${
MAJOR_VERSION
}
+ 100*
${
MINOR_VERSION
}
+
${
PATCH
}
"
)
MARK_AS_ADVANCED
(
VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION
)
SET
(
CPACK_PACKAGE_VERSION_MAJOR
${
MAJOR_VERSION
}
)
SET
(
CPACK_PACKAGE_VERSION_MINOR
${
MINOR_VERSION
}
)
SET
(
CPACK_PACKAGE_VERSION_PATCH
${
PATCH
}
)
ENDMACRO
()
# Get mysql version and other interesting variables
GET_MYSQL_VERSION
()
MYSQL_GET_CONFIG_VALUE
(
"PROTOCOL_VERSION"
PROTOCOL_VERSION
)
MYSQL_GET_CONFIG_VALUE
(
"DOT_FRM_VERSION"
DOT_FRM_VERSION
)
MYSQL_GET_CONFIG_VALUE
(
"MYSQL_TCP_PORT_DEFAULT"
MYSQL_TCP_PORT_DEFAULT
)
MYSQL_GET_CONFIG_VALUE
(
"MYSQL_UNIX_ADDR_DEFAULT"
MYSQL_UNIX_ADDR_DEFAULT
)
MYSQL_GET_CONFIG_VALUE
(
"SHARED_LIB_MAJOR_VERSION"
SHARED_LIB_MAJOR_VERSION
)
IF
(
NOT MYSQL_TCP_PORT_DEFAULT
)
SET
(
MYSQL_TCP_PORT_DEFAULT
"3306"
)
ENDIF
()
IF
(
NOT MYSQL_TCP_PORT
)
SET
(
MYSQL_TCP_PORT
${
MYSQL_TCP_PORT_DEFAULT
}
)
SET
(
MYSQL_TCP_PORT_DEFAULT
"0"
)
ELSEIF
(
MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT
)
SET
(
MYSQL_TCP_PORT_DEFAULT
"0"
)
ENDIF
()
IF
(
NOT MYSQL_UNIX_ADDR
)
SET
(
MYSQL_UNIX_ADDR
"/tmp/mysql.sock"
)
ENDIF
()
IF
(
NOT COMPILATION_COMMENT
)
SET
(
COMPILATION_COMMENT
"Source distribution"
)
ENDIF
()
SET
(
WITH_EXAMPLE_STORAGE_ENGINE TRUE
)
SET
(
WITH_FEDERATEDX_STORAGE_ENGINE TRUE
)
SET
(
WITH_PARTITION_STORAGE_ENGINE TRUE
)
SET
(
WITH_MARIA_STORAGE_ENGINE TRUE
)
SET
(
WITH_PBXT_STORAGE_ENGINE TRUE
)
SET
(
WITH_XTRADB_STORAGE_ENGINE TRUE
)
# Hardcode support for CSV storage engine
SET
(
WITH_CSV_STORAGE_ENGINE TRUE
)
...
...
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