forked from NVIDIAGameWorks/Falcor
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_vs2022.bat
More file actions
36 lines (28 loc) · 804 Bytes
/
setup_vs2022.bat
File metadata and controls
36 lines (28 loc) · 804 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
: This script sets up a Visual Studio 2022 solution.
@echo off
setlocal
set PRESET_SUFFIX=""
if "%~1"=="ci" (
set PRESET_SUFFIX="-ci"
)
: Fetch dependencies.
call %~dp0\setup.bat
: Configuration.
set PRESET=windows-vs2022%PRESET_SUFFIX%
set TOOLSET=host=x86
set CMAKE_EXE=%~dp0\tools\.packman\cmake\bin\cmake.exe
set CUSTOM_CUDA_DIR=%~dp0\external\packman\cuda
: Check if custom CUDA directory contains a valid CUDA SDK.
: Adjust toolset string to use the custom CUDA toolkit.
if exist %CUSTOM_CUDA_DIR%\bin\nvcc.exe (
set TOOLSET=%TOOLSET%,cuda="%CUSTOM_CUDA_DIR%"
)
: Configure solution by running cmake.
echo Configuring Visual Studio solution ...
%CMAKE_EXE% --preset %PRESET% -T %TOOLSET%
if errorlevel 1 (
echo Failed to configure solution!
exit /b 1
)
: Success.
exit /b 0