X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=make.sh;h=2ebe12011854c06aad3b33df2221ef0d973cc436;hb=d93f18c32f27c9a87a00ddeb0eebff9364104b14;hp=5c82271858e4e82679e6b76a2ec128bb9c1a6e7c;hpb=7b036891787ba2a3fadb3e77a3bb315574bc5d9f;p=modules%2Fshaper.git diff --git a/make.sh b/make.sh index 5c8227185..2ebe12011 100755 --- a/make.sh +++ b/make.sh @@ -1,20 +1,40 @@ #!/bin/bash source env.sh -source env_standalone.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" +while [[ $# > 0 ]]; do + key="$1" + + case $key in + debug|Debug) + BUILD_TYPE=Debug + shift + ;; + lcov|coverage) + BUILD_TYPE=Debug + USE_TEST_COVERAGE=ON + shift + ;; + standalone|Standalone) + MODE=Standalone + shift + ;; + *) + shift + ;; + esac +done + +if [[ ${MODE} = 'Standalone' ]]; then + source ${TOOLS_DIR}/env_standalone.sh else - CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release" + source ${TOOLS_DIR}/env_salome.sh fi -CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_DIR}" + +CMAKE_ARGS="" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Release}" +CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=${USE_TEST_COVERAGE:-OFF}" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${SHAPER_ROOT_DIR}" CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}" mkdir -p ${BUILD_DIR}