forked from robaho/cpp_orderbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcleanup_project.bat
More file actions
141 lines (115 loc) · 3.66 KB
/
Copy pathcleanup_project.bat
File metadata and controls
141 lines (115 loc) · 3.66 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@echo off
echo ================================================================
echo 🧹 CLEANING UNNECESSARY FILES AND DEPENDENCIES
echo ================================================================
cd /d "%~dp0"
echo.
echo 📋 Removing temporary and generated files...
echo --------------------------------------------------------
REM Remove temporary files
if exist demo_output.txt (
echo Removing demo_output.txt
del demo_output.txt
)
if exist temp_count.txt (
echo Removing temp_count.txt
del temp_count.txt
)
REM Remove test executables in root (should be in build directories)
if exist minimal_ordermap_test.exe (
echo Removing minimal_ordermap_test.exe
del minimal_ordermap_test.exe
)
if exist test_no_macros.exe (
echo Removing test_no_macros.exe
del test_no_macros.exe
)
if exist test_order_constructor.exe (
echo Removing test_order_constructor.exe
del test_order_constructor.exe
)
if exist test_order_with_fixed.exe (
echo Removing test_order_with_fixed.exe
del test_order_with_fixed.exe
)
if exist test_smart_pointers.exe (
echo Removing test_smart_pointers.exe
del test_smart_pointers.exe
)
REM Remove archive files
if exist *.zip (
echo Removing archive files
del *.zip
)
echo.
echo 📋 Checking build directories...
echo --------------------------------------------------------
if exist build (
echo Found build directory with contents:
dir /b build | findstr /v "^$" > temp_build_files.txt
for /f "tokens=*" %%f in (temp_build_files.txt) do echo - %%f
del temp_build_files.txt
echo (Keeping build/ - may contain useful build artifacts)
)
if exist build_gtest (
echo Found build_gtest directory with contents:
dir /b build_gtest | findstr /v "^$" > temp_gtest_files.txt
for /f "tokens=*" %%f in (temp_gtest_files.txt) do echo - %%f
del temp_gtest_files.txt
echo (Keeping build_gtest/ - contains test executables and libraries)
)
if exist build_msvc (
echo Removing empty build_msvc directory
rmdir /s /q build_msvc
)
echo.
echo 📋 Analyzing source files for dependencies...
echo --------------------------------------------------------
echo Core source files:
dir /b src\*.cpp 2>nul
echo.
echo Header files:
dir /b include\*.h 2>nul
echo.
echo Demo files:
dir /b demo\*.cpp 2>nul
echo.
echo 📋 Checking for duplicate or obsolete files...
echo --------------------------------------------------------
if exist CMakeLists_old.txt (
echo Removing obsolete CMakeLists_old.txt
del CMakeLists_old.txt
)
echo.
echo 📋 Final directory structure:
echo --------------------------------------------------------
echo Source code:
echo - src/ (core implementation)
echo - include/ (header files)
echo - demo/ (demonstration programs)
echo - tests/ (unit tests)
echo - cmake/ (CMake modules)
echo.
echo Build artifacts:
echo - build_gtest/ (compiled tests and libraries)
echo - build/ (general build files)
echo.
echo Configuration:
echo - CMakeLists.txt
echo - Makefile
echo - *.bat scripts
echo.
echo ================================================================
echo ✅ CLEANUP COMPLETED
echo ================================================================
echo.
echo 📊 Summary:
echo - Removed temporary files and outputs
echo - Removed duplicate executables from root
echo - Updated .gitignore for better file management
echo - Preserved essential build artifacts
echo - Maintained clean project structure
echo.
echo 🎯 Project is now clean and ready for development!
echo ================================================================
pause