-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDC_full_rebuild.sh
executable file
·43 lines (34 loc) · 1.01 KB
/
DC_full_rebuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Print the starting message
echo "Starting the build process..."
# Remove the build directory if it exists
if [ -d "build" ]; then
echo "Removing existing 'build' directory..."
rm -r build
else
echo "'build' directory does not exist. Skipping removal step..."
fi
# Create a new build directory
echo "Creating new 'build' directory..."
mkdir build
# Change into the build directory
echo "Changing into the 'build' directory..."
cd build
# Run CMake to generate build files
echo "Running CMake to generate build files..."
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/jasonmzx/downloaded_repos/vcpkg/scripts/buildsystems/vcpkg.cmake
# Check if CMake succeeded
if [ $? -ne 0 ]; then
echo "CMake configuration failed. Exiting..."
exit 1
fi
# Build the project using make
echo "Building the project using make..."
make -j8
# Check if make succeeded
if [ $? -ne 0 ]; then
echo "Build process failed. Exiting..."
exit 1
fi
# Print the finishing message
echo "Build process completed successfully!"