-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34c7d14
commit eeb8290
Showing
3 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,7 @@ src/.tags | |
src/.tags_sorted_by_file | ||
|
||
/.vs | ||
/out | ||
/CMakeSettings.json | ||
/venv/ | ||
/cmake-build-*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
#!/bin/bash | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
DIR="$(readlink -f $DIR/..)" | ||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
DIR="$(readlink -f "$DIR/..")" | ||
|
||
[ -z "$LLVM_DIR" ] && echo "Must set specific LLVM_DIR for packaging" && exit | ||
|
||
# shellcheck disable=SC2154 | ||
[ -z "$Clang_DIR" ] && echo "Must set specific Clang_DIR for packaging" && exit | ||
|
||
# shellcheck disable=SC2034 | ||
flag_shared="-DBUILD_SHARED_LIBS=YES" | ||
|
||
# shellcheck disable=SC2034 | ||
flag_static="-DBUILD_SHARED_LIBS=NO" | ||
|
||
for ty in shared static | ||
do | ||
for cfg in Debug Release | ||
do | ||
for ty in shared static; do | ||
for cfg in Debug Release; do | ||
flag_name=flag_$ty | ||
cmake -G Ninja -DCMAKE_BUILD_TYPE=$cfg ${!flag_name}\ | ||
-DLLVM_DIR=$LLVM_DIR -DClang_DIR=$Clang_DIR \ | ||
cmake -G Ninja -DCMAKE_BUILD_TYPE=$cfg ${!flag_name} \ | ||
-DLLVM_DIR="$LLVM_DIR" -DClang_DIR="$Clang_DIR" \ | ||
-DWITH_TESTS=NO -DWITH_APPS=NO -DWITH_TUTORIALS=NO \ | ||
-DWITH_DOCS=YES -DWITH_UTILS=NO -DWITH_PYTHON_BINDINGS=NO \ | ||
-S "$DIR" -B "$DIR/build/$ty-$cfg" | ||
cmake --build "$DIR/build/$ty-$cfg" | ||
done | ||
done | ||
|
||
(cd "$DIR/build"; cpack --config "$DIR/packaging/Linux.cmake") | ||
|
||
( | ||
cd "$DIR/build" || exit | ||
cpack --config "$DIR/packaging/Linux.cmake" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@echo off | ||
|
||
pushd %~dp0\.. | ||
|
||
if not exist "%VCPKG_ROOT%\.vcpkg-root" ( | ||
echo Must define VCPKG_ROOT to be the root of the VCPKG install | ||
goto return | ||
) | ||
|
||
cmake -G "Ninja Multi-Config" -DBUILD_SHARED_LIBS=YES ^ | ||
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake ^ | ||
-DWITH_TESTS=NO -DWITH_APPS=NO -DWITH_TUTORIALS=NO ^ | ||
-DWITH_DOCS=YES -DWITH_UTILS=NO -DWITH_PYTHON_BINDINGS=NO ^ | ||
-S . -B build/shared | ||
|
||
if %errorlevel% neq 0 goto return | ||
|
||
cmake --build build/shared --config Debug | ||
cmake --build build/shared --config Release | ||
|
||
cd build\shared | ||
cpack -B .. -C "Debug;Release" | ||
|
||
:return | ||
popd | ||
exit /b |