X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=make.sh;h=49d78c1f49a41d9d2aec9bc930821cf47f23b364;hb=fd9315665d8b110d39866496112ebb314de02ac3;hp=2b19c4102e6dafa90442d4514a2dd9a49438cac2;hpb=9827c27a867badf2ec250ba3eef49fe8492c72cb;p=modules%2Fshaper.git diff --git a/make.sh b/make.sh index 2b19c4102..49d78c1f4 100755 --- a/make.sh +++ b/make.sh @@ -1,24 +1,58 @@ #!/bin/bash +while [[ $# > 0 ]]; do + key="$1" + + case $key in + debug|Debug) + BUILD_TYPE=Debug + shift + ;; + lcov|coverage) + BUILD_TYPE=Debug + USE_TEST_COVERAGE=ON + shift + ;; + models|test-models) + ADD_MODELS_TESTS=TRUE + shift + ;; + compatibility|test-compatibility) + ADD_COMPATIBILITY_TESTS=TRUE + shift + ;; + hdf|test-hdf-models) + ADD_HDF_TESTS=TRUE + shift + ;; + *) + shift + ;; + esac +done + +## Preserve PTHONPATH in order to avoid problems with Sphinx on Fedora26 because of Pigments in ParaView +export PYTHONPATH_OLD=$PYTHONPATH 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" -else - CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release" +if [[ ${OS_NAME} = Fedora26-64 ]] +then + export PYTHONPATH=$PYTHONPATH_OLD 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} -DADD_MODELS_TESTS=${ADD_MODELS_TESTS:-FALSE}" +CMAKE_ARGS="${CMAKE_ARGS} -DADD_COMPATIBILITY_TESTS=${ADD_COMPATIBILITY_TESTS:-FALSE}" +CMAKE_ARGS="${CMAKE_ARGS} -DADD_HDF_TESTS=${ADD_HDF_TESTS:-FALSE}" +CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${SHAPER_ROOT_DIR}" CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}" mkdir -p ${BUILD_DIR} cd ${BUILD_DIR} +set -e + cmake -G "Unix Makefiles" ${CMAKE_ARGS} make -j$(nproc) install