From: spo Date: Wed, 18 Nov 2015 12:29:32 +0000 (+0300) Subject: Improve make.sh X-Git-Tag: V_2.0.0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6357e81ac1e8926e6d6bdd6f0d9a7a41b1f09259;p=modules%2Fshaper.git Improve make.sh --- diff --git a/make.sh b/make.sh index fd684dce0..9aaa3ae61 100755 --- a/make.sh +++ b/make.sh @@ -1,19 +1,30 @@ #!/bin/bash source env.sh + +while [[ $# > 0 ]]; do + key="$1" + + case $key in + debug|Debug) + CMAKE_BUILD_TYPE=Debug + shift + ;; + lcov|coverage) + CMAKE_BUILD_TYPE=Debug + USE_TEST_COVERAGE=ON + shift + ;; + esac + + shift +done + source ${TOOLS_DIR}/env_salome.sh CMAKE_ARGS="" -if [ -f GCOV ]; then - echo "Use GCOV..." - source env_lcov.sh - CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug" - CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=ON" -elif [ -f DEBUG ]; then - CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Debug" -else - CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release" -fi +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release}" +CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=${USE_TEST_COVERAGE:-OFF}" CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${NEWGEOM_ROOT_DIR}" CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}"