Travis: optimize macOS deploy build
- Turns on the -DENABLE_LTO flag during deploy - Turns off the -DENABLE_OPENMP flag during testpull/760/head
parent
ab10e38d44
commit
f3f33d3f26
|
@ -1,14 +1,9 @@
|
|||
#!/bin/sh -xe
|
||||
|
||||
if echo $TRAVIS_TAG | grep ^v; then
|
||||
BUILD_TYPE=RelWithDebInfo
|
||||
else
|
||||
BUILD_TYPE=Debug
|
||||
fi
|
||||
|
||||
mkdir build || true
|
||||
cd build
|
||||
|
||||
OSX_TARGET="10.9"
|
||||
LLVM_PREFIX=$(brew --prefix llvm@9)
|
||||
export CC="${LLVM_PREFIX}/bin/clang"
|
||||
export CXX="${CC}++"
|
||||
|
@ -16,10 +11,19 @@ export LDFLAGS="-L${LLVM_PREFIX}/lib -Wl,-rpath,${LLVM_PREFIX}/lib" \
|
|||
export CFLAGS="-I${LLVM_PREFIX}/include"
|
||||
export CPPFLAGS="-I${LLVM_PREFIX}/include"
|
||||
|
||||
if echo $TRAVIS_TAG | grep ^v; then
|
||||
BUILD_TYPE=RelWithDebInfo
|
||||
cmake \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE .. \
|
||||
-DENABLE_OPENMP=ON
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_TARGET}" \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" .. \
|
||||
-DENABLE_OPENMP=ON \
|
||||
-DENABLE_LTO=ON
|
||||
else
|
||||
BUILD_TYPE=Debug
|
||||
cmake \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET="${OSX_TARGET}" \
|
||||
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" ..
|
||||
fi
|
||||
|
||||
cmake --build . --config $BUILD_TYPE -- -j$(nproc)
|
||||
cmake --build . --config "${BUILD_TYPE}" -- -j$(nproc)
|
||||
make -j$(nproc) test_solvespace
|
||||
|
|
Loading…
Reference in New Issue