Ninja and ccache - faster builds!
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 1m28s
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 1m28s
This commit is contained in:
@ -17,7 +17,6 @@ if command -v nproc >/dev/null 2>&1; then
|
||||
JOBS=$(nproc)
|
||||
fi
|
||||
|
||||
|
||||
# Function to print status messages
|
||||
print_status() {
|
||||
echo -e "${GREEN}[*] $1${NC}"
|
||||
@ -49,20 +48,25 @@ if ! command -v cmake &> /dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if make is installed
|
||||
if ! command -v make &> /dev/null; then
|
||||
print_error "Make is not installed. Please install Make first."
|
||||
# Check if Ninja is installed
|
||||
if ! command -v ninja &> /dev/null; then
|
||||
print_error "Ninja is not installed. Please install Ninja first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if ccache is installed
|
||||
if ! command -v ccache &> /dev/null; then
|
||||
print_warning "ccache is not installed. Builds will be slower without it."
|
||||
print_warning "Consider installing ccache for faster builds."
|
||||
fi
|
||||
|
||||
# Configure with CMake
|
||||
print_status "Configuring with CMake..."
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||
#cmake .. -DCMAKE_BUILD_TYPE=Release
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
|
||||
# Build the project
|
||||
print_status "Building project..."
|
||||
make -j"$JOBS"
|
||||
ninja -j"$JOBS"
|
||||
|
||||
# Check if build was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
|
Reference in New Issue
Block a user