-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcc.bat
More file actions
27 lines (22 loc) · 784 Bytes
/
cc.bat
File metadata and controls
27 lines (22 loc) · 784 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
@echo off
setlocal enableextensions enabledelayedexpansion
@REM for cl : c++latest (for c++23)
@REM for clang++: c++23
set CPP_VERSION=c++23
echo .
echo -------------------------
echo Compilation
echo -------------------------
echo -- Using %CPP_VERSION%
@REM Print clang version and date
for /f "tokens=3" %%v in ('clang++ --version ^| find "clang version"') do (
echo -- clang++ version: %%v
curl -s "https://api.github.com/repos/llvm/llvm-project/releases/tags/llvmorg-%%v" | find "published_at"
)
clang++ -std=%CPP_VERSION% -fexceptions -Wall -Wextra -Wpedantic -fcolor-diagnostics main.cpp
@REM cl main.cpp /std:%CPP_VERSION%
if %ERRORLEVEL% neq 0 (
echo . & echo -- Compilation failed! Exiting...
exit /b %ERRORLEVEL%
)
echo -- Compilation succeeded...