Skip to content

Commit 00d06e1

Browse files
Merge pull request #369 from Distributive-Network/Xmader/ci/fix-windows-uncrustify
Chore(CI): fix building `uncrustify` on Windows
2 parents af1c425 + 3883b62 commit 00d06e1

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ _spidermonkey_install
1414
uncrustify-*.tar.gz
1515
uncrustify-*/
1616
uncrustify
17+
uncrustify.exe
1718
*.uncrustify
1819
__pycache__/*
1920
dist

setup.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,15 @@ echo "Building uncrustify"
5858
cd uncrustify-source
5959
mkdir -p build
6060
cd build
61-
cmake ../
62-
make -j4
63-
cp uncrustify ../../uncrustify
61+
if [[ "$OSTYPE" == "msys"* ]]; then # Windows
62+
cmake ../ -T ClangCL
63+
cmake --build . -j$CPUS --config Release
64+
cp Release/uncrustify.exe ../../uncrustify.exe
65+
else
66+
cmake ../
67+
make -j$CPUS
68+
cp uncrustify ../../uncrustify
69+
fi
6470
cd ../..
6571
echo "Done building uncrustify"
6672

0 commit comments

Comments
 (0)