forked from LAK132/SourceExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
46 lines (38 loc) · 671 Bytes
/
Copy pathsetup.bat
File metadata and controls
46 lines (38 loc) · 671 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
35
36
37
38
39
40
41
42
43
44
45
46
@echo off
SetLocal EnableDelayedExpansion
if "%~1"=="msvc" (
set meson_args=--vsenv
goto run
)
if "%~1"=="clang" (
set CC=clang
set CXX=clang++
goto run
)
if "%~1"=="gcc" (
set CC=gcc
set CXX=g++
goto run
)
goto usage
:run
shift
if not "%~1"=="--reconfigure" (
rmdir /s /q build
)
:arg-loop
if "%1"=="" goto end-arg-loop
set meson_args=!meson_args! %1
shift
goto arg-loop
:end-arg-loop
meson setup build !meson_args!
goto :eof
:usage
echo setup.bat [compiler] ^<setup args^>
echo examples:
echo setup.bat msvc
echo setup.bat msvc --buildtype release
echo setup.bat gcc --buildtype debug
echo setup.bat clang --buildtype debugoptimized
goto :eof