Unverified Commit 39bea5cd authored by David Boucher's avatar David Boucher Committed by GitHub
Browse files

enh(cmake): a little script to prepare the build (#19)

parent 3be72bd0
#!/bin/bash
v=$(cmake --version)
if [[ $v =~ "version 3" ]] ; then
cmake='cmake'
else
if rpm -q cmake3 ; then
cmake='cmake3'
else
yum -y install epel-release cmake3
cmake='cmake3'
fi
fi
if [ ! -d build ] ; then
mkdir build
else
echo "'build' directory already there"
fi
cd build
conan remote add centreon https://api.bintray.com/conan/centreon/centreon
conan install --remote centreon ..
CXXFLAGS="-Wall -Wextra" "$cmake" -DCMAKE_BUILD_TYPE=Debug -DWITH_TESTING=On -DWITH_PREFIX_BINARY=/usr/lib64/centreon-connector/ $* ..
#CXX=/usr/bin/clang++ CC=/usr/bin/clang cmake -DWITH_PREFIX=/usr -DWITH_PREFIX_BIN=/usr/sbin -DWITH_USER=centreon-engine -DWITH_GROUP=centreon-engine -DCMAKE_BUILD_TYPE=Debug -DWITH_RW_DIR=/var/lib/centreon-engine/rw -DWITH_PREFIX_CONF=/etc/centreon-engine -DWITH_VAR_DIR=/var/log/centreon-engine -DWITH_PREFIX_LIB=/usr/lib64/centreon-engine -DWITH_TESTING=On -DWITH_SIMU=On .
#CXX=/usr/lib64/ccache/g++ CC=/usr/lib64/ccache/gcc cmake -DWITH_PREFIX=/usr -DWITH_PREFIX_BIN=/usr/sbin -DWITH_USER=centreon-engine -DWITH_GROUP=centreon-engine -DCMAKE_BUILD_TYPE=Debug -DWITH_RW_DIR=/var/lib/centreon-engine/rw -DWITH_PREFIX_CONF=/etc/centreon-engine -DWITH_VAR_DIR=/var/log/centreon-engine -DWITH_PREFIX_LIB=/usr/lib64/centreon-engine -DWITH_TESTING=On -DWITH_SIMU=On .
#CXXFLAGS="-O1 -fsanitize=address -fno-omit-frame-pointer" cmake -DWITH_PREFIX=/usr -DWITH_PREFIX_BIN=/usr/sbin -DWITH_USER=centreon-engine -DWITH_GROUP=centreon-engine -DCMAKE_BUILD_TYPE=Debug -DWITH_RW_DIR=/var/lib/centreon-engine/rw -DWITH_PREFIX_CONF=/etc/centreon-engine -DWITH_VAR_DIR=/var/log/centreon-engine -DWITH_PREFIX_LIB=/usr/lib64/centreon-engine -DWITH_TESTING=On -DWITH_SIMU=On .
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment