memgraph/tools/setup
Teon Banek a17261038c Include tools CMakeLists in the top level CMakeLists
Summary:
Split main CMakeLists into src/CMakeLists

The main CMakeLists duty is to make all the required libraries and
variables visible to all of the other sub-CMakeLists. After doing that,
it should include those sub-CMakeLists according to configuration
options.

This should make global configurations easier to reuse without polluting
the global space with locally related configurations. It is a necessary
step for including other projects like 'tools' in the release
installation.

Building tools is automatically disabled, but can be enabled by setting
the TOOLS option to ON when running cmake. This should allow on demand
building as well as combined installation of Memgraph and its tools.

Reviewers: mferencevic, buda

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1018
2017-12-04 15:18:18 +01:00

22 lines
472 B
Bash
Executable File

#!/bin/bash -e
# Builds the memgraph tools and installs them in this directory.
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p ${script_dir}/build
cd ${script_dir}/build
# Setup cmake
cmake -DCMAKE_BUILD_TYPE=Release \
-DTOOLS=ON \
-DCMAKE_INSTALL_PREFIX=${script_dir} \
${script_dir}/..
# Install the tools
make -j$(nproc) tools
cmake -DCOMPONENT=tools -P cmake_install.cmake
cd ${script_dir}
mv bin/* ./
rm -rf bin build