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
9cabc9fd
Commit
9cabc9fd
authored
Jan 28, 2010
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prettification of package names and fix compile bug on OSX/ppc
parent
eb818684
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
53 deletions
+134
-53
cmake/Makefile.am
cmake/Makefile.am
+1
-0
cmake/mysql_version.cmake
cmake/mysql_version.cmake
+2
-47
cmake/os/Windows.cmake
cmake/os/Windows.cmake
+0
-2
cmake/package_name.cmake
cmake/package_name.cmake
+124
-0
include/my_atomic.h
include/my_atomic.h
+1
-1
sql/CMakeLists.txt
sql/CMakeLists.txt
+6
-3
No files found.
cmake/Makefile.am
View file @
9cabc9fd
EXTRA_DIST
=
\
cmake_parse_arguments.cmake
\
package_name.cmake
\
configurable_file_content.in
\
check_minimal_version.cmake
\
create_initial_db.cmake.in
\
...
...
cmake/mysql_version.cmake
View file @
9cabc9fd
...
...
@@ -97,53 +97,8 @@ IF(NOT COMPILATION_COMMENT)
ENDIF
()
# Use meaningful package name for the binary package
IF
(
NOT CPACK_PACKAGE_FILE_NAME
)
IF
(
NOT SYSTEM_NAME_AND_PROCESSOR
)
IF
(
WIN32
)
# CMake does not set CMAKE_SYSTEM_PROCESSOR correctly on Win64
# (uses x86). Besides, we try to be compatible with existing naming
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
SYSTEM_NAME_AND_PROCESSOR
"winx64"
)
ELSE
()
SET
(
SYSTEM_NAME_AND_PROCESSOR
"win32"
)
ENDIF
()
ELSE
()
IF
(
NOT PLATFORM
)
SET
(
PLATFORM
${
CMAKE_SYSTEM_NAME
}
)
ENDIF
()
IF
(
NOT MACHINE
)
SET
(
MACHINE
${
CMAKE_SYSTEM_PROCESSOR
}
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT
${
MACHINE
}
MATCHES
"ia64"
)
# On almost every 64 bit machine (except IA64) it is possible
# to build 32 bit packages. Add -64bit suffix to differentiate
# between 32 and 64 bit packages.
SET
(
MACHINE
${
MACHINE
}
-64bit
)
ENDIF
()
ENDIF
()
SET
(
SYSTEM_NAME_AND_PROCESSOR
"
${
PLATFORM
}
-
${
MACHINE
}
"
)
ENDIF
()
ENDIF
()
IF
(
SHORT_PRODUCT_TAG
)
SET
(
PRODUCT_TAG
"-
${
SHORT_PRODUCT_TAG
}
"
)
ELSEIF
(
MYSQL_SERVER_SUFFIX
)
SET
(
PRODUCT_TAG
"
${
MYSQL_SERVER_SUFFIX
}
"
)
# Already has a leading dash
ELSE
()
SET
(
PRODUCT_TAG
)
ENDIF
()
SET
(
package_name
"mysql
${
PRODUCT_TAG
}
-
${
VERSION
}
-
${
SYSTEM_NAME_AND_PROCESSOR
}
"
)
# Sometimes package suffix is added (something like "-icc-glibc23")
IF
(
PACKAGE_SUFFIX
)
SET
(
package_name
"
${
package_name
}${
PACKAGE_SUFFIX
}
"
)
ENDIF
()
STRING
(
TOLOWER
${
package_name
}
package_name
)
SET
(
CPACK_PACKAGE_FILE_NAME
${
package_name
}
)
ENDIF
()
INCLUDE
(
package_name
)
GET_PACKAGE_FILE_NAME
(
CPACK_PACKAGE_FILE_NAME
)
IF
(
NOT CPACK_SOURCE_PACKAGE_FILE_NAME
)
SET
(
CPACK_SOURCE_PACKAGE_FILE_NAME
"mysql-
${
VERSION
}
"
)
...
...
cmake/os/Windows.cmake
View file @
9cabc9fd
...
...
@@ -102,14 +102,12 @@ IF(MSVC)
ADD_DEFINITIONS
(
/wd4996
)
ENDIF
()
SET
(
PLATFORM X86
)
IF
(
CMAKE_SIZEOF_VOID_P MATCHES 8
)
# _WIN64 is defined by the compiler itself.
# Yet, we define it here again to work around a bug with Intellisense
# described here: http://tinyurl.com/2cb428.
# Syntax highlighting is important for proper debugger functionality.
ADD_DEFINITIONS
(
"-D_WIN64"
)
SET
(
PLATFORM X64
)
ENDIF
()
ENDIF
()
...
...
cmake/package_name.cmake
0 → 100644
View file @
9cabc9fd
# Copyright (C) 2010 Sun Microsystems, Inc
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Produce meaningful package name for the binary package
# The logic is rather involved with special cases for different OSes
MACRO
(
GET_PACKAGE_FILE_NAME Var
)
IF
(
NOT VERSION
)
MESSAGE
(
FATAL_ERROR
"Variable VERSION needs to be set prior to calling GET_PACKAGE_FILE_NAME"
)
ENDIF
()
IF
(
NOT SYSTEM_NAME_AND_PROCESSOR
)
SET
(
NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1
)
SET
(
DEFAULT_PLATFORM
${
CMAKE_SYSTEM_NAME
}
)
SET
(
DEFAULT_MACHINE
${
CMAKE_SYSTEM_PROCESSOR
}
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
64BIT 1
)
ENDIF
()
IF
(
CMAKE_SYSTEM_NAME MATCHES
"Windows"
)
SET
(
NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0
)
SET
(
DEFAULT_PLATFORM
"win"
)
IF
(
64BIT
)
SET
(
DEFAULT_MACHINE
"x64"
)
ELSE
()
SET
(
DEFAULT_MACHINE
"32"
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"Linux"
)
IF
(
NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES
"x86_64"
)
SET
(
DEFAULT_MACHINE
"i686"
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"SunOS"
)
# SunOS 5.10=> solaris10
STRING
(
REPLACE
"5."
""
VER
"
${
CMAKE_SYSTEM_VERSION
}
"
)
SET
(
DEFAULT_PLATFORM
"solaris
${
VER
}
"
)
IF
(
64BIT
)
IF
(
CMAKE_SYSTEM_PROCESSOR MATCHES
"i386"
)
SET
(
DEFAULT_MACHINE
"x86_64"
)
ELSE
()
SET
(
DEFAULT_MACHINE
"
${
CMAKE_SYSTEM_PROCESSOR
}
-64bit"
)
ENDIF
()
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"HP-UX"
)
STRING
(
REPLACE
"B."
""
VER
"
${
CMAKE_SYSTEM_VERSION
}
"
)
SET
(
DEFAULT_PLATFORM
"hpux
${
VER
}
"
)
IF
(
64BIT
)
SET
(
DEFAULT_MACHINE
"
${
CMAKE_SYSTEM_PROCESSOR
}
-64bit"
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"AIX"
)
SET
(
DEFAULT_PLATFORM
"
${
CMAKE_SYSTEM_NAME
}
5.
${
CMAKE_SYSTEM_VERSION
}
"
)
IF
(
64BIT
)
SET
(
DEFAULT_MACHINE
"
${
CMAKE_SYSTEM_PROCESSOR
}
-64bit"
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"FreeBSD"
)
STRING
(
REGEX MATCH
"[0-9]+
\\
.[0-9]+"
VER
"
${
CMAKE_SYSTEM_VERSION
}
"
)
SET
(
DEFAULT_PLATFORM
"
${
CMAKE_SYSTEM_NAME
}${
VER
}
"
)
IF
(
CMAKE_SYSTEM_PROCESSOR MATCHES
"amd64"
)
SET
(
DEFAULT_MACHINE
"x86_64"
)
IF
(
NOT 64BIT
)
SET
(
DEFAULT_MACHINE
"i386"
)
ENDIF
()
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_NAME MATCHES
"Darwin"
)
IF
(
${
CMAKE_OSX_DEPLOYMENT_TARGET
}
)
SET
(
VER
"
${
CMAKE_OSX_DEPLOYMENT_TARGET
}
"
)
ELSE
()
SET
(
VER
"
${
CMAKE_SYSTEM_VERSION
}
"
)
ENDIF
()
STRING
(
REGEX REPLACE
"([0-9]+)
\\
.[0-9]+
\\
.[0-9]+"
"
\\
1"
VER
"
${
VER
}
"
)
MATH
(
EXPR VER
"
${
VER
}
-4"
)
SET
(
DEFAULT_PLATFORM
"osx10.
${
VER
}
"
)
LIST
(
LENGTH CMAKE_OSX_ARCHITECTURES LEN
)
IF
(
LEN GREATER 1
)
SET
(
DEFAULT_MACHINE
"universal"
)
ELSE
()
SET
(
DEFAULT_MACHINE
"
${
CMAKE_OSX_ARCHITECTURES
}
"
)
ENDIF
()
IF
(
DEFAULT_MACHINE MATCHES
"i386"
)
SET
(
DEFAULT_MACHINE
"x86"
)
ENDIF
()
ENDIF
()
IF
(
NOT PLATFORM
)
SET
(
PLATFORM
${
DEFAULT_PLATFORM
}
)
ENDIF
()
IF
(
NOT MACHINE
)
SET
(
MACHINE
${
DEFAULT_MACHINE
}
)
ENDIF
()
IF
(
NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE
)
SET
(
SYSTEM_NAME_AND_PROCESSOR
"
${
PLATFORM
}
-
${
MACHINE
}
"
)
ELSE
()
SET
(
SYSTEM_NAME_AND_PROCESSOR
"
${
PLATFORM
}${
MACHINE
}
"
)
ENDIF
()
ENDIF
()
IF
(
SHORT_PRODUCT_TAG
)
SET
(
PRODUCT_TAG
"-
${
SHORT_PRODUCT_TAG
}
"
)
ELSEIF
(
MYSQL_SERVER_SUFFIX
)
SET
(
PRODUCT_TAG
"
${
MYSQL_SERVER_SUFFIX
}
"
)
# Already has a leading dash
ELSE
()
SET
(
PRODUCT_TAG
)
ENDIF
()
SET
(
package_name
"mysql
${
PRODUCT_TAG
}
-
${
VERSION
}
-
${
SYSTEM_NAME_AND_PROCESSOR
}
"
)
# Sometimes package suffix is added (something like "-icc-glibc23")
IF
(
PACKAGE_SUFFIX
)
SET
(
package_name
"
${
package_name
}${
PACKAGE_SUFFIX
}
"
)
ENDIF
()
STRING
(
TOLOWER
${
package_name
}
package_name
)
SET
(
${
Var
}
${
package_name
}
)
ENDMACRO
()
include/my_atomic.h
View file @
9cabc9fd
...
...
@@ -105,7 +105,7 @@
warning: 'transparent_union' attribute ignored
*/
#if defined(__GNUC__) && !defined(__cplusplus) && \
! (defined(__APPLE__) &&
defined(_ARCH_PPC64
))
! (defined(__APPLE__) &&
(defined(_ARCH_PPC64) ||defined (_ARCH_PPC)
))
/*
we want to be able to use my_atomic_xxx functions with
both signed and unsigned integers. But gcc will issue a warning
...
...
sql/CMakeLists.txt
View file @
9cabc9fd
...
...
@@ -121,10 +121,13 @@ IF(NOT WITHOUT_DYNAMIC_PLUGINS)
FILE
(
TO_NATIVE_PATH
${
LOC
}
LOC
)
SET
(
LIB_LOCATIONS
${
LIB_LOCATIONS
}
${
LOC
}
)
ENDFOREACH
(
CORELIB
${
MYSQLD_CORE_LIBS
}
)
SET
(
_PLATFORM x86
)
IF
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
_PLATFORM x64
)
ENDIF
()
ADD_CUSTOM_COMMAND
(
TARGET mysqld PRE_LINK
COMMAND echo
${
PLATFORM
}
&& cscript ARGS //nologo
${
PROJECT_SOURCE_DIR
}
/win/create_def_file.js
${
PLATFORM
}
${
LIB_LOCATIONS
}
> mysqld.def
COMMAND echo
${
_
PLATFORM
}
&& cscript ARGS //nologo
${
PROJECT_SOURCE_DIR
}
/win/create_def_file.js
${
_
PLATFORM
}
${
LIB_LOCATIONS
}
> mysqld.def
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
)
ADD_DEPENDENCIES
(
sql GenError
)
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