Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
3e1e5355
Commit
3e1e5355
authored
11 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'stable' of github.com:tarantool/tarantool into stable
parents
c8db588a
eee5719f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
README.MacOSX
+19
-5
19 additions, 5 deletions
README.MacOSX
cmake/compiler.cmake
+33
-23
33 additions, 23 deletions
cmake/compiler.cmake
src/CMakeLists.txt
+3
-2
3 additions, 2 deletions
src/CMakeLists.txt
with
57 additions
and
30 deletions
CMakeLists.txt
+
2
−
0
View file @
3e1e5355
...
@@ -12,6 +12,8 @@ include(CheckCCompilerFlag)
...
@@ -12,6 +12,8 @@ include(CheckCCompilerFlag)
include
(
CheckSymbolExists
)
include
(
CheckSymbolExists
)
include
(
CheckCSourceRuns
)
include
(
CheckCSourceRuns
)
include
(
CheckCXXSourceRuns
)
include
(
CheckCXXSourceRuns
)
include
(
CheckCSourceCompiles
)
include
(
CheckCXXSourceCompiles
)
include
(
TestBigEndian
)
include
(
TestBigEndian
)
include
(
CheckFunctionExists
)
include
(
CheckFunctionExists
)
...
...
This diff is collapsed.
Click to expand it.
README.MacOSX
+
19
−
5
View file @
3e1e5355
OS X Readme
===========
This manual explains how to manually build tarantool from sources.
If you just need a working binary, please use homebrew:
brew install http://tarantool.org/dist/tarantool.rb
Target OS: MacOS X "Lion"
Target OS: MacOS X "Lion"
First of all, make sure mac ports are available (to install packages from).
First of all, make sure mac ports are available (to install packages from).
...
@@ -7,7 +15,13 @@ First of all, make sure mac ports are available (to install packages from).
...
@@ -7,7 +15,13 @@ First of all, make sure mac ports are available (to install packages from).
port install autoconf binutils cmake ncurses zlib readline
port install autoconf binutils cmake ncurses zlib readline
2. Install necessary python modules: pexpect, pyYAML, daemon
2. Upgrade clang to 3.2+
Go to http://developer.apple.com/ to download and install the latest version
of "Command Line Tools for Xcode". This package contains /usr/bin/clang and
/usr/bin/clang++ binaries. Check that clang version is at least 3.2.
3. Install necessary python modules: pyYAML, daemon
-------------
-------------
NB: it is recommended to install python modules through setup.py,
NB: it is recommended to install python modules through setup.py,
using the default python (which should be >= 2.6.x and < 3.x);
using the default python (which should be >= 2.6.x and < 3.x);
...
@@ -16,10 +30,10 @@ tar -xzf module.tar.gz
...
@@ -16,10 +30,10 @@ tar -xzf module.tar.gz
cd module-dir
cd module-dir
sudo python setup.py install
sudo python setup.py install
where module is the name of the installed module and module-dir is the name of
the directory
where module is the name of the installed module and module-dir is the name of
the module's archive deflates into.
the directory
the module's archive deflates into.
3
. Download & build tarantool source code:
4
. Download & build tarantool source code:
-------------
-------------
git clone git://github.com/tarantool/tarantool.git
git clone git://github.com/tarantool/tarantool.git
...
@@ -27,7 +41,7 @@ git clone git://github.com/tarantool/tarantool.git
...
@@ -27,7 +41,7 @@ git clone git://github.com/tarantool/tarantool.git
cd tarantool
cd tarantool
CC=clang CXX=clang++ cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true
CC=clang CXX=clang++ cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true
4
. Run tarantool test suite
5
. Run tarantool test suite
-------------
-------------
NB: the following tests are not runnable on MacOS X at this point:
NB: the following tests are not runnable on MacOS X at this point:
...
...
This diff is collapsed.
Click to expand it.
cmake/compiler.cmake
+
33
−
23
View file @
3e1e5355
...
@@ -16,22 +16,28 @@ if (CMAKE_C_COMPILER_ID STREQUAL Clang)
...
@@ -16,22 +16,28 @@ if (CMAKE_C_COMPILER_ID STREQUAL Clang)
set
(
CMAKE_COMPILER_IS_GNUCXX OFF
)
set
(
CMAKE_COMPILER_IS_GNUCXX OFF
)
endif
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCC
)
#
# gcc and g++ >= 4.5 are supported
# Check supported standards
execute_process
(
COMMAND
${
CMAKE_C_COMPILER
}
-dumpversion
#
OUTPUT_VARIABLE CC_VERSION
)
if
((
NOT HAVE_STD_C11 AND NOT HAVE_STD_GNU99
)
OR
if
(
CC_VERSION VERSION_LESS 4.5
)
(
NOT HAVE_STD_CXX11 AND NOT HAVE_STD_GNUXX0X
))
message
(
FATAL_ERROR
set
(
CMAKE_REQUIRED_FLAGS
"-std=c11"
)
"
${
CMAKE_C_COMPILER
}
version should be >= 4.5 --
${
CC_VERSION
}
"
)
check_c_source_compiles
(
"int main(void) { return 0; }"
HAVE_STD_C11
)
endif
()
set
(
CMAKE_REQUIRED_FLAGS
"-std=gnu99"
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-dumpversion
check_c_source_compiles
(
"int main(void) { return 0; }"
HAVE_STD_GNU99
)
OUTPUT_VARIABLE CXX_VERSION
)
set
(
CMAKE_REQUIRED_FLAGS
"-std=c++11"
)
if
(
CXX_VERSION VERSION_LESS 4.5
)
check_cxx_source_compiles
(
"int main(void) { return 0; }"
HAVE_STD_CXX11
)
message
(
FATAL_ERROR
set
(
CMAKE_REQUIRED_FLAGS
"-std=gnu++0x"
)
"
${
CMAKE_CXX_COMPILER
}
version should be >= 4.5 --
${
CXX_VERSION
}
"
)
check_cxx_source_compiles
(
"int main(void) { return 0; }"
HAVE_STD_GNUXX0X
)
endif
()
set
(
CMAKE_REQUIRED_FLAGS
""
)
endif
()
if
((
NOT HAVE_STD_C11 AND NOT HAVE_STD_GNU99
)
OR
(
NOT HAVE_STD_CXX11 AND NOT HAVE_STD_GNUXX0X
))
message
(
FATAL_ERROR
"
${
CMAKE_C_COMPILER
}
should support -std=c11 or -std=gnu99. "
"
${
CMAKE_CXX_COMPILER
}
should support -std=c++11 or -std=gnu++0x. "
"Please consider upgrade to gcc 4.5+ or clang 3.2+."
)
endif
()
endif
()
#
#
# Perform build type specific configuration.
# Perform build type specific configuration.
...
@@ -82,12 +88,15 @@ macro(enable_tnt_compile_flags)
...
@@ -82,12 +88,15 @@ macro(enable_tnt_compile_flags)
# of the code.
# of the code.
# Set standard
# Set standard
if
(
CMAKE_COMPILER_IS_CLANG OR CC_VERSION VERSION_GREATER 4.7 OR
if
(
HAVE_STD_C11
)
CC_VERSION VERSION_EQUAL 4.7
)
add_compile_flags
(
"C"
"-std=c11"
)
add_compile_flags
(
"C"
"-std=c11"
)
add_compile_flags
(
"CXX"
"-std=c++11"
)
else
()
else
()
add_compile_flags
(
"C"
"-std=gnu99"
)
add_compile_flags
(
"C"
"-std=gnu99"
)
endif
()
if
(
HAVE_STD_CXX11
)
add_compile_flags
(
"CXX"
"-std=c++11"
)
else
()
add_compile_flags
(
"CXX"
"-std=gnu++0x"
)
add_compile_flags
(
"CXX"
"-std=gnu++0x"
)
endif
()
endif
()
...
@@ -112,11 +121,12 @@ macro(enable_tnt_compile_flags)
...
@@ -112,11 +121,12 @@ macro(enable_tnt_compile_flags)
add_definitions
(
"-D__STDC_LIMIT_MACROS=1"
)
add_definitions
(
"-D__STDC_LIMIT_MACROS=1"
)
add_definitions
(
"-D__STDC_CONSTANT_MACROS=1"
)
add_definitions
(
"-D__STDC_CONSTANT_MACROS=1"
)
# Only add -Werror if it's a debug build, done by developers using GCC.
# Only add -Werror if it's a debug build, done by developers.
# Community builds should not cause extra trouble.
# Release builds should not cause extra trouble.
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
AND CMAKE_COMPILER_IS_GNUCC
)
if
((
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
)
add_compile_flags
(
"C;CXX"
"-Werror"
)
AND HAVE_STD_C11 AND HAVE_STD_CXX11
)
endif
()
add_compile_flags
(
"C;CXX"
"-Werror"
)
endif
()
endmacro
(
enable_tnt_compile_flags
)
endmacro
(
enable_tnt_compile_flags
)
#
#
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
3
−
2
View file @
3e1e5355
...
@@ -3,8 +3,9 @@
...
@@ -3,8 +3,9 @@
#
#
enable_tnt_compile_flags
()
enable_tnt_compile_flags
()
if
(
NOT TARGET_OS_DARWIN
)
add_subdirectory
(
plugin
)
add_subdirectory
(
plugin
)
endif
()
include_directories
(
${
LIBEV_INCLUDE_DIR
}
)
include_directories
(
${
LIBEV_INCLUDE_DIR
}
)
include_directories
(
${
LIBEIO_INCLUDE_DIR
}
)
include_directories
(
${
LIBEIO_INCLUDE_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment