Repository navigation
Expand file tree
/
Copy pathbuild.bat
More file actions
70 lines (62 loc) · 1.55 KB
/
Copy pathbuild.bat
File metadata and controls
70 lines (62 loc) · 1.55 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
@echo off
REM EDN.C - Windows Build Script
REM Quick build using CMake (works with MSVC, MinGW, or Clang)
echo EDN.C Windows Build Script
echo ==========================
echo.
REM Check if CMake is available
where cmake >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo ERROR: CMake not found. Please install CMake from https://cmake.org/download/
exit /b 1
)
REM Check if build directory exists
if not exist build (
echo Creating build directory...
mkdir build
)
cd build
REM Configure
echo.
echo Configuring project...
cmake .. -DCMAKE_BUILD_TYPE=Release
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: CMake configuration failed.
echo.
echo Troubleshooting:
echo - Make sure you have a C compiler installed (Visual Studio, MinGW, or Clang^)
echo - If using MSVC, run this script from "Developer Command Prompt for VS"
echo - If using MinGW, run from MINGW64 terminal
echo.
exit /b 1
)
REM Build
echo.
echo Building library and tests...
cmake --build . --config Release
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Build failed.
exit /b 1
)
echo.
echo ========================================
echo Build successful!
echo ========================================
echo.
echo Library: build\Release\edn.lib (or build\libedn.a)
echo Tests: build\Release\*.exe (or build\test_*.exe)
echo.
echo To run tests:
echo cd build
echo ctest -C Release
echo.
echo To run a single test:
echo .\Release\test_parser.exe
echo (or .\test_parser.exe on MinGW)
echo.
echo To run benchmarks:
echo .\Release\bench_integration.exe
echo.
cd ..