Salome HOME
Add unit tests to load HDF files and check results.
[modules/shaper.git] / make.sh
1 #!/bin/bash
2
3 while [[ $# > 0 ]]; do
4   key="$1"
5
6   case $key in
7     debug|Debug)
8       BUILD_TYPE=Debug
9       shift
10       ;;
11     lcov|coverage)
12       BUILD_TYPE=Debug
13       USE_TEST_COVERAGE=ON
14       shift
15       ;;
16     models|test-models)
17       ADD_MODELS_TESTS=TRUE
18       shift
19       ;;
20     compatibility|test-compatibility)
21       ADD_COMPATIBILITY_TESTS=TRUE
22       shift
23       ;;
24     *)
25       shift
26       ;;
27   esac
28 done
29
30 ## Preserve PTHONPATH in order to avoid problems with Sphinx on Fedora26 because of Pigments in ParaView
31 export PYTHONPATH_OLD=$PYTHONPATH
32 source env.sh
33
34 if [[ ${OS_NAME} = Fedora26-64 ]]
35 then
36   export PYTHONPATH=$PYTHONPATH_OLD
37 fi
38
39 CMAKE_ARGS=""
40 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Release}"
41 CMAKE_ARGS="${CMAKE_ARGS} -DUSE_TEST_COVERAGE=${USE_TEST_COVERAGE:-OFF}"
42 CMAKE_ARGS="${CMAKE_ARGS} -DADD_MODELS_TESTS=${ADD_MODELS_TESTS:-FALSE}"
43 CMAKE_ARGS="${CMAKE_ARGS} -DADD_COMPATIBILITY_TESTS=${ADD_COMPATIBILITY_TESTS:-FALSE}"
44 CMAKE_ARGS="${CMAKE_ARGS} -DADD_HDF_TESTS=${ADD_HDF_TESTS:-FALSE}"
45 CMAKE_ARGS="${CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX:PATH=${SHAPER_ROOT_DIR}"
46 CMAKE_ARGS="${CMAKE_ARGS} ${SOURCES_DIR}"
47
48 mkdir -p ${BUILD_DIR}
49 cd ${BUILD_DIR}
50
51 set -e
52
53 cmake -G "Unix Makefiles" ${CMAKE_ARGS}
54 make -j$(nproc) install