Salome HOME
"Conflicting constraints" should appear when a center of fillet is coincident with...
[modules/shaper.git] / make.sh
diff --git a/make.sh b/make.sh
index ef61abcce00baedbc0e58a9ca914ea71947d8272..15b951265c280548253548ee4de85d763d9d6487 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,18 +1,46 @@
+#!/bin/bash
 
-# Find absolute path to ROOT_DIR
-export ROOT_DIR=$(pwd)/..
-export ROOT_DIR=`cd "${ROOT_DIR}";pwd`
+source env.sh
 
-SRC_DIR=${ROOT_DIR}/sources
+while [[ $# > 0 ]]; do
+  key="$1"
 
-source ${SRC_DIR}/linux_env.sh
-mkdir -p ${ROOT_DIR}/build
-cd ${ROOT_DIR}/build
+  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
 
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${ROOT_DIR}/install"
-CMAKE_ARGS="${CMAKE_ARGS} ${SRC_DIR}"
+if [[ ${MODE} = 'Standalone' ]]; then
+  source ${TOOLS_DIR}/env_standalone.sh
+else
+  source ${TOOLS_DIR}/env_salome.sh
+fi
+
+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=${NEWGEOM_ROOT_DIR}"
+CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}"
+
+mkdir -p ${BUILD_DIR}
+cd ${BUILD_DIR}
+
+set -e
 
 cmake -G "Unix Makefiles" ${CMAKE_ARGS}
-make
-make install
+make -j$(nproc) install