fixed filepaths and removed all cmake files
This commit is contained in:
@@ -50,6 +50,17 @@ create_build_dir() {
|
||||
configure_project() {
|
||||
print_message "Configuring project with CMake..."
|
||||
|
||||
# Clear stale cache if the source directory has changed
|
||||
if [ -f "build/CMakeCache.txt" ]; then
|
||||
cached_src=$(grep "^CMAKE_HOME_DIRECTORY:INTERNAL=" build/CMakeCache.txt | cut -d= -f2)
|
||||
current_src="$(pwd)"
|
||||
if [ "$cached_src" != "$current_src" ]; then
|
||||
print_warning "Stale CMake cache detected (was: $cached_src). Clearing build directory..."
|
||||
rm -rf build
|
||||
mkdir -p build
|
||||
fi
|
||||
fi
|
||||
|
||||
cd build
|
||||
cmake ..
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user