-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New batch file to compile all the tools, on Windows.
- Loading branch information
1 parent
ae6f1c5
commit 5171abc
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@echo off | ||
REM ---------------------------------------------------------------------------- | ||
REM A Windows script to compile all the cpp files into exe versions. | ||
REM Assumes that your compiler is on %PATH%. | ||
REM ---------------------------------------------------------------------------- | ||
REM Norman Dunbar 2nd September 2016. | ||
REM ---------------------------------------------------------------------------- | ||
|
||
REM ---------------------------------------------------------------------------- | ||
REM What is the command to run your compiler front end? | ||
REM ---------------------------------------------------------------------------- | ||
REM Change this to suit, the default is the free Borland c++ compiler version | ||
REM 10.1 which you can get free from embarcadero.com. | ||
REM It's up to date which Visual C++ will never ever be. | ||
REM ---------------------------------------------------------------------------- | ||
set compiler=bcc32c | ||
|
||
REM ---------------------------------------------------------------------------- | ||
REM Compile everything cpp-ish, and tidy away the surplus files. | ||
REM ---------------------------------------------------------------------------- | ||
REM Read back each file, stripping off the .cpp extension. | ||
REM This assumes that the filename appears, in full, before the first dot. | ||
REM ---------------------------------------------------------------------------- | ||
for /f "tokens=1 delims=." %%f in ('dir /b *.cpp') do ( | ||
echo Compiling %%f.cpp to %%f.exe ... | ||
%compiler% -o %%f.exe %%f.cpp | ||
|
||
if not %errorlevel%==0 ( | ||
echo Compiler exited with errorlevel %ERRORLEVEL%. | ||
) | ||
|
||
del %%f.tds 2>nul | ||
|
||
) |