Unverified Commit ae50211f authored by rem31's avatar rem31 Committed by GitHub
Browse files

Mon 6521 study arm compilation (#36)

* enh(compilation) add compilation for Raspbian (raspberry pi3)

REFS: MON-6521

* enh(compilation) add compilation for Raspbian (raspberry pi3)

    REFS: MON-6521
parent 1f50bc0b
......@@ -20,7 +20,11 @@
cmake_minimum_required(VERSION 2.8)
project("Centreon Clib" C CXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1")
if (USE_CXX11_ABI)
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1")
else ()
add_definitions("-D_GLIBCXX_USE_CXX11_ABI=0")
endif ()
# Set directories.
set(INCLUDE_DIR "${PROJECT_SOURCE_DIR}/inc")
......
#!/bin/bash
# Usage info
show_help() {
cat << EOF
Usage: ${0##*/} -n=[yes|no] -v
if [ "$1" = "-f" ] ; then
force=1
shift
fi
This program build Centreon-clib
-f|--force : force rebuild
-r|--release : Build on release mode
-h|--help : help
EOF
}
force=0
BUILD_TYPE="Debug"
for i in "$@"
do
case $i in
-f|--force)
force=1
shift
;;
-r|--release)
BUILD_TYPE="Release"
;;
-h|--help)
show_help
exit 2
;;
*)
# unknown option
;;
esac
done
# Am I root?
my_id=$(id -u)
......@@ -126,11 +154,17 @@ if [ ! -d build ] ; then
mkdir build
fi
if [ "$force" = "1" ] ; then
rm -rf build
mkdir build
fi
cd build
if [ $maj = "Raspbian" ] ; then
CXXFLAGS="-Wall -Wextra" $cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_PREFIX_LIB=/usr/lib -DWITH_TESTING=On $* ..
CXXFLAGS="-Wall -Wextra" $cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_PREFIX_LIB=/usr/lib -DWITH_TESTING=On -DUSE_CXX11_ABI=1 $* ..
elif [ $maj = "Debian" ] ; then
CXXFLAGS="-Wall -Wextra" $cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_PREFIX_LIB=/usr/lib64 -DWITH_TESTING=On -DUSE_CXX11_ABI=1 $* ..
else
CXXFLAGS="-Wall -Wextra" $cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_PREFIX_LIB=/usr/lib64 -DWITH_TESTING=On $* ..
CXXFLAGS="-Wall -Wextra" $cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWITH_PREFIX_LIB=/usr/lib64 -DWITH_TESTING=On -DUSE_CXX11_ABI=0 $* ..
fi
#CXX=/usr/bin/clang++ CC=/usr/bin/clang CXXFLAGS="-Wall -Wextra" cmake -DWITH_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DWITH_PREFIX_LIB=/usr/lib64 -DWITH_TESTING=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