Salome HOME
Add construction plugin without tests.
[modules/shaper.git] / make.sh
diff --git a/make.sh b/make.sh
index d076d44e1fe24b4f6cda466f9ece4e2918a48a06..5c82271858e4e82679e6b76a2ec128bb9c1a6e7c 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -3,13 +3,24 @@
 source env.sh
 source env_standalone.sh
 
-mkdir -p ${BUILD_DIR}
-cd ${BUILD_DIR}
-
 CMAKE_ARGS=""
-CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release"
+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_INSTALL_PREFIX:PATH=${INSTALL_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