Skip to content
Snippets Groups Projects
Commit c83077de authored by Martin Beseda's avatar Martin Beseda
Browse files

[FIX] [Linux] Added space after '-j' flag. Added '-e' flag to 'echo' commands...

[FIX] [Linux] Added space after '-j' flag. Added '-e' flag to 'echo' commands in *.sh build scripts to allow colors in the output.
parent 811a2820
No related branches found
No related tags found
No related merge requests found
......@@ -45,8 +45,8 @@ CYAN='\033[0;36m'
YELLOW='\033[1;33m'
GREEN='\033[0;32m'
WHITE='\033[1;37m'
NC='\033[0m' # No Color
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}"
NC='\033[m' # No Color
echo -e "Building the ${CYAN}lib4neuro${NC} project for ${WHITE}Debug${NC}"
BUILD_SOMETHING=no
......@@ -54,30 +54,30 @@ BUILD_SOMETHING_LIB=no
if [ ${BUILD_LIB} = "yes" ]
then
echo "${CYAN}lib4neuro${NC} build type: ${WHITE}Debug${NC}"
echo "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}"
echo "${CYAN}lib4neuro${NC} will be built in '${YELLOW}build/lib/${NC}'"
echo -e "${CYAN}lib4neuro${NC} build type: ${WHITE}Debug${NC}"
echo -e "${CYAN}lib4neuro${NC} build architecture: ${WHITE}x64${NC}"
echo -e "${CYAN}lib4neuro${NC} will be built in '${YELLOW}build/lib/${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ $BUILD_TESTS = "yes" ]
then
echo "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
echo -e "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
echo "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
echo -e "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
#if [ ${REBUILD_BOOST} = "yes" ]
#then
# echo "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'"
# echo -e "The required '${CYAN}BOOST${NC}' library will be recompiled in the directory '${YELLOW}external_dependencies/boost${NC}'"
# rm -rf ../../external_dependencies/boost/stage
# rm -rf ../../external_dependencies/boost/bin.v2
# BUILD_SOMETHING=yes
......@@ -106,20 +106,20 @@ then
if [ ${BUILD_TESTS} = "yes" ]
then
./linux_clean_tests.sh
fi
fi
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (preparing makefiles)"
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (preparing makefiles)"
cd ../..
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
if [ ${BUILD_ERROR_OCCURED} = "0" ]
then
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
. $(pwd)/set_env_n_cores
cmake --build build --config Debug -j${N_CORES} && echo "${GREEN}Build complete${NC}." || { echo "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
cmake --build build --config Debug -j ${N_CORES} && echo -e "${GREEN}Build complete${NC}." || { echo -e "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
fi
cd build_scripts/linux
......@@ -151,6 +151,6 @@ fi
if [ ${BUILD_ERROR_OCCURED} = "1" ]
then
echo "${RED}Build encountered some errors!${NC}"
echo -e "${RED}Build encountered some errors!${NC}"
exit 1
fi
......@@ -43,7 +43,7 @@ YELLOW='\033[1;33m'
GREEN='\033[0;32m'
WHITE='\033[1;37m'
NC='\033[0m' # No Color
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}"
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC}"
BUILD_SOMETHING=no
......@@ -60,14 +60,14 @@ fi
if [ ${BUILD_TESTS} = "yes" ]
then
echo "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
echo -e "${CYAN}lib4neuro${NC} unit tests will be built in '${YELLOW}build/unit-tests${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
if [ ${BUILD_EXAMPLES} = "yes" ]
then
echo "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
echo -e "${CYAN}lib4neuro${NC} examples will be built in '${YELLOW}build/examples${NC}'"
BUILD_SOMETHING=yes
BUILD_SOMETHING_LIB=yes
fi
......@@ -94,17 +94,17 @@ then
./linux_clean_tests.sh
fi
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (preparing makefiles)"
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (preparing makefiles)"
cd ../..
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_C_COMPILER=${C_COMPILER} -DBOOST_LIBRARYDIR=${BOOST_LIBRARYDIR} -DBOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -DBUILD_TESTS=${BUILD_TESTS} -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_LIB=${BUILD_LIB} -DDEPENDENCIES_LINK_TYPE=${LINK_TYPE} -S . -B build || { echo -e "${RED}Makefile preparation finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
if [ ${BUILD_ERROR_OCCURED} -eq 0 ]
then
echo "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
cmake --build build --config Debug -- -j${N_CORES} && echo "${GREEN}Build complete${NC}." || { echo "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
echo -e "Building the '${CYAN}lib4neuro${NC}' project for ${WHITE}Debug${NC} (building)"
cmake --build build --config Debug -- -j ${N_CORES} && echo -e "${GREEN}Build complete${NC}." || { echo -e "${RED}Build finished with errors${NC}!"; BUILD_ERROR_OCCURED=1; }
fi
cd build_scripts/linux
......@@ -139,6 +139,6 @@ fi
if [ ${BUILD_ERROR_OCCURED} -eq 1 ]
then
echo "${RED}Build encountered some errors!${NC}"
echo -e "${RED}Build encountered some errors!${NC}"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment