2019-10-29 09:30:35 +01:00
|
|
|
#!/bin/bash
|
2021-01-05 11:15:32 +01:00
|
|
|
set -e
|
|
|
|
|
set -o pipefail
|
2019-10-29 09:30:35 +01:00
|
|
|
source CI/ci-linux-prepare.sh
|
|
|
|
|
|
|
|
|
|
echo -e "${OUTPUT}"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "======================================================================"
|
|
|
|
|
echo "Basic configuration details:"
|
|
|
|
|
echo "======================================================================"
|
|
|
|
|
echo -e "${NC}"
|
|
|
|
|
|
|
|
|
|
echo "Compiler: $COMPILER"
|
|
|
|
|
echo "Options: $OPTIONS"
|
|
|
|
|
echo "Language: $LANGUAGE"
|
|
|
|
|
echo "Make Options: $OPTIONS"
|
|
|
|
|
echo "BuildPath: $BUILDPATH"
|
|
|
|
|
echo "Path: $PATH"
|
|
|
|
|
echo "Language: $LANGUAGE"
|
|
|
|
|
|
2021-02-09 12:27:37 +01:00
|
|
|
if [ "$VECTORCHECKS" == "yes" ]; then
|
|
|
|
|
echo -e "${OUTPUT}"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "======================================================================"
|
|
|
|
|
echo "Building $BUILD_TYPE version with vectorchecks enabled"
|
|
|
|
|
echo "======================================================================"
|
|
|
|
|
echo -e "${NC}"
|
|
|
|
|
fi
|
2019-10-29 09:30:35 +01:00
|
|
|
|
2021-02-02 14:25:38 +01:00
|
|
|
if [ ! -d build-$BUILDPATH ]; then
|
|
|
|
|
mkdir build-$BUILDPATH
|
2019-10-29 09:30:35 +01:00
|
|
|
fi
|
|
|
|
|
|
2021-02-02 14:25:38 +01:00
|
|
|
cd build-$BUILDPATH
|
2019-10-29 09:30:35 +01:00
|
|
|
|
2021-02-09 12:27:37 +01:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE $OPTIONS ../
|
2019-10-29 09:30:35 +01:00
|
|
|
|
2021-02-09 12:27:37 +01:00
|
|
|
if [ "$IWYU" == "yes" ]; then
|
2021-01-05 11:09:54 +01:00
|
|
|
# do iwyu check
|
|
|
|
|
if echo $(iwyu --version) | grep -q "0.11"
|
|
|
|
|
then
|
|
|
|
|
# support older tool version
|
|
|
|
|
iwyu_tool -j 4 -p . -- \
|
|
|
|
|
--mapping_file=/usr/share/include-what-you-use/gcc.libc.imp \
|
|
|
|
|
--mapping_file=/usr/share/include-what-you-use/clang-6.intrinsics.imp \
|
|
|
|
|
| tee iwyu.dump
|
|
|
|
|
else
|
|
|
|
|
# current tool version
|
|
|
|
|
iwyu_tool -j 4 -p . -- \
|
|
|
|
|
-Xiwyu --mapping_file=/usr/share/include-what-you-use/gcc.libc.imp \
|
|
|
|
|
-Xiwyu --mapping_file=/usr/share/include-what-you-use/clang-6.intrinsics.imp \
|
|
|
|
|
| tee iwyu.dump
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
# build it
|
|
|
|
|
make $MAKE_OPTIONS
|
2021-02-02 16:01:22 +01:00
|
|
|
|
|
|
|
|
# build unittests
|
|
|
|
|
make $MAKE_OPTIONS unittests
|
2021-02-02 16:15:16 +01:00
|
|
|
|
2021-06-01 14:45:36 +02:00
|
|
|
ldd Unittests/unittests
|
|
|
|
|
|
|
|
|
|
|
2021-02-02 16:15:16 +01:00
|
|
|
# Creating System Library folder to contain all dependend libraries to run OpenFlipper
|
|
|
|
|
if [ ! -d systemlib ]; then
|
|
|
|
|
echo "Creating systemlib folder"
|
|
|
|
|
mkdir systemlib
|
|
|
|
|
fi
|
|
|
|
|
|
2021-02-02 17:32:16 +01:00
|
|
|
echo "Copying all required libraries of OpenMesh to the systemlib directory"
|
2021-02-09 10:53:36 +01:00
|
|
|
if [ "$BUILD_TYPE" == "release" ]; then
|
2022-01-19 08:39:41 +01:00
|
|
|
ldd Build/lib/libOpenMeshCore.so.9.1 | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' systemlib
|
2021-02-09 10:42:58 +01:00
|
|
|
else
|
2022-01-19 08:39:41 +01:00
|
|
|
ldd Build/lib/libOpenMeshCored.so.9.1 | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' systemlib
|
2021-02-09 10:42:58 +01:00
|
|
|
fi
|
2021-01-05 11:09:54 +01:00
|
|
|
fi
|
2019-10-29 09:30:35 +01:00
|
|
|
|
2021-06-01 14:45:36 +02:00
|
|
|
cd ..
|