Skip to content

Commit d02a192

Browse files
added key --clear remove previous compilations
1 parent 3a7c10d commit d02a192

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

build.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sudo apt-get install -y \
4141
USE_CITUS=OFF
4242
USE_SQLITE=OFF
4343
ENABLE_ASAN=OFF
44+
CLEAR_PREVIOUS=OFF
4445

4546
for arg in "$@"; do
4647
case $arg in
@@ -58,6 +59,10 @@ for arg in "$@"; do
5859
echo "Enabling AddressSanitizer and UndefinedBehaviorSanitizer"
5960
ENABLE_ASAN=ON
6061
;;
62+
--clear)
63+
echo "Enabling clear previous compilations"
64+
CLEAR_PREVIOUS=ON
65+
;;
6166
*)
6267
;;
6368
esac
@@ -73,7 +78,10 @@ rm -rf CMakeFiles
7378
# Create build directory and copy related folders
7479
mkdir -p build
7580
cd build
76-
find . -mindepth 1 -maxdepth 1 ! -name "certs" -exec rm -rf {} +
81+
if $CLEAR_PREVIOUS; then
82+
echo "Clearing previous compilations..."
83+
find . -mindepth 1 -maxdepth 1 ! -name "certs" -exec rm -rf {} +
84+
fi
7785

7886
# Run CMake
7987
cmake .. -B . \

0 commit comments

Comments
 (0)