2020-10-16 19:11:42 +00:00
|
|
|
#!/bin/sh -xe
|
|
|
|
|
|
|
|
MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
|
|
|
|
export PATH=$MSBUILD_PATH:$PATH
|
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
2020-10-24 09:08:40 +00:00
|
|
|
if [ "$1" = "release" ]; then
|
|
|
|
if [ "$2" = "openmp" ]; then
|
|
|
|
ENABLE_OPENMP="ON"
|
|
|
|
else
|
|
|
|
ENABLE_OPENMP="OFF"
|
|
|
|
fi
|
2020-10-21 19:13:49 +00:00
|
|
|
BUILD_TYPE=RelWithDebInfo
|
|
|
|
cmake \
|
2020-10-24 09:08:40 +00:00
|
|
|
-G "Visual Studio 15 2017" \
|
|
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
|
|
-DENABLE_OPENMP="${ENABLE_OPENMP}" \
|
|
|
|
-DENABLE_LTO=ON \
|
|
|
|
-DCMAKE_GENERATOR_PLATFORM="Win32" \
|
|
|
|
..
|
2020-10-21 19:13:49 +00:00
|
|
|
else
|
|
|
|
BUILD_TYPE=Debug
|
|
|
|
cmake \
|
2020-10-24 09:08:40 +00:00
|
|
|
-G "Visual Studio 15 2017" \
|
|
|
|
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
|
|
|
|
-DENABLE_OPENMP="ON" \
|
|
|
|
-DCMAKE_GENERATOR_PLATFORM="Win32" \
|
|
|
|
..
|
2020-10-21 19:13:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cmake --build . --config "${BUILD_TYPE}" -- -maxcpucount
|
2020-10-16 19:11:42 +00:00
|
|
|
|
|
|
|
bin/$BUILD_TYPE/solvespace-testsuite.exe
|
2020-10-24 09:08:40 +00:00
|
|
|
|
|
|
|
if [ "$2" = "openmp" ]; then
|
|
|
|
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace-openmp.exe
|
|
|
|
fi
|