-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
34 lines (25 loc) · 853 Bytes
/
Copy pathbuild.bat
File metadata and controls
34 lines (25 loc) · 853 Bytes
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
@echo off
REM Set the path variables
set BUILD_DIR=out
set EXECUTABLE="cpplogger.exe"
set GCC="gcc.exe"
set GPP="g++.exe"
set CMAKE="cmake.exe"
set MAKE="mingw32-make.exe"
set GENERATOR="MinGW Makefiles"
REM Remove old cache folders
if exist %BUILD_DIR% rmdir /s /q %BUILD_DIR%
REM Create the directory
mkdir %BUILD_DIR%
REM Change directory to build directory
cd %BUILD_DIR%
REM Compile the project with CMake gcc and g++ compilers
%CMAKE% -G %GENERATOR% -DCMAKE_C_COMPILER=%GCC% -DCMAKE_CXX_COMPILER=%GPP% -DCMAKE_MAKE_PROGRAM=%MAKE% ..
REM Build the Makefile
%CMAKE% --build .
REM Remove the final binary once executed
cd ..
REM Execute the final binary
"./%BUILD_DIR%/%EXECUTABLE%"
REM Print the final success message for little nerd happiness after hours of grinding :)
echo "You did it nerd.. Congrats!! Now go and have a break buddy :)"