forked from he4rt/scylladb-php-driver
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request he4rt#104 from he4rt/feat/better-compilation-scripts
feature(scripts): compilation scripts for libuv and cpp drivers
- Loading branch information
Showing
3 changed files
with
74 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
SCYLLA_OR_CASSANDRA=$1 | ||
CURRENT_DIR="$(pwd)" | ||
|
||
if [ -z "$SCYLLA_OR_CASSANDRA" ]; then | ||
SCYLLA_OR_CASSANDRA="scylladb" | ||
fi | ||
|
||
if [ "$SCYLLA_OR_CASSANDRA" = "scylladb" ]; then | ||
GIT_REPO="https://github.com/scylladb/cpp-driver.git" | ||
GIT_OUTPUT="/opt/scylladb-driver" | ||
else | ||
GIT_REPO="https://github.com/datastax/cpp-driver.git" | ||
GIT_OUTPUT="/opt/cassandra-driver" | ||
fi | ||
|
||
git clone --depth 1 "$GIT_REPO" "$GIT_OUTPUT" | ||
|
||
cd "$GIT_OUTPUT" || exit 1 | ||
|
||
mkdir build || exit 1 | ||
|
||
cd build || exit 1 | ||
|
||
CFLAGS="-fPIC" CXXFLAGS="-fPIC -Wno-error=redundant-move" LDFLAGS="-flto" cmake -G Ninja \ | ||
-DCASS_CPP_STANDARD=17 \ | ||
-DCASS_BUILD_STATIC=ON \ | ||
-DCASS_BUILD_SHARED=ON \ | ||
-DCASS_USE_STD_ATOMIC=ON \ | ||
-DCASS_USE_STATIC_LIBS=ON \ | ||
-DCASS_USE_TIMERFD=ON \ | ||
-DCASS_USE_LIBSSH2=ON \ | ||
-DCASS_USE_ZLIB=ON \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_EXPORT_COMPILE_COMMANDS="OFF" \ | ||
-DCMAKE_BUILD_TYPE="RelWithInfo" \ | ||
.. | ||
|
||
CFLAGS="-fPIC" CXXFLAGS="-fPIC -Wno-error=redundant-move" LDFLAGS="-flto" ninja install | ||
|
||
cd .. || exit | ||
|
||
rm -rf build | ||
|
||
cd "$CURRENT_DIR" || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
LIBUV_VERSION="v1.48.0" | ||
LIBUV_REPO="https://github.com/libuv/libuv.git" | ||
CURRENT_DIR="$(pwd)" | ||
|
||
git clone --depth=1 "$LIBUV_REPO" /opt/libuv | ||
|
||
cd /opt/libuv || exit 1 | ||
|
||
git fetch --tags | ||
|
||
git checkout -b $LIBUV_VERSION tags/$LIBUV_VERSION | ||
|
||
mkdir build || exit 1 | ||
|
||
cd build || exit 1 | ||
|
||
LDFLAGS="-flto" CFLAGS="-fPIC" cmake -G Ninja \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_BENCHMARKS=OFF \ | ||
-DLIBUV_BUILD_SHARED=ON \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_BUILD_TYPE="RelWithInfo" .. | ||
|
||
LDFLAGS="-flto" CFLAGS="-fPIC" ninja install | ||
|
||
cd .. || exit | ||
|
||
rm -rf build | ||
|
||
cd "$CURRENT_DIR" || exit 1 |
This file was deleted.
Oops, something went wrong.