@echo off REM This script expects to be run from the parent directory REM ex. scripts/config.bat REM script options (like -c and -r) must come before any cmake options (EXAMPLE_BASIC, NO_DIAG, etc) set options= set build_type= IF "%1"=="" goto command goto loop :command IF "%build_type%"=="" ( set build_type=-DCMAKE_BUILD_TYPE=Debug echo Build mode is Debug ) echo using options %options% :: cmake -Wno-dev %build_type% %options% -B build/ -S . -G "Visual Studio 17 2022" -A x64 cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -Wno-dev -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang %build_type% %options% -B build/ -S . -G Ninja goto exit :loop IF "%1"=="-c" ( call scripts\clean.bat goto loop_condition ) IF "%1"=="-r" ( echo Build mode is release set build_type=-DCMAKE_BUILD_TYPE=Release goto loop_condition ) set options=%options%-D%1=ON :loop_condition shift IF "%1"=="" goto command goto loop :exit