Fix hctbuild -b -ninja and explain ninja build steps in README. (#238)
This commit is contained in:
Родитель
4c22ec7802
Коммит
7a23033d69
16
README.md
16
README.md
|
@ -77,6 +77,20 @@ You can then use the build directory in the `hctstart` script to test the build.
|
|||
|
||||
hctstart C:\source\DirectXShaderCompiler %LOCALAPPDATA%\CMakeBuild\DirectXShaderCompiler\build\x64-Debug
|
||||
|
||||
### Building with Ninja
|
||||
|
||||
To build with Ninja, please make sure that you have `ninja` and `cl` in your `%PATH%`.
|
||||
`ninja` can be installed from [here](https://github.com/ninja-build/ninja/releases);
|
||||
`cl` should already be installed together with Visual Studio and can be exported to `%PATH%` via the `vcvars*.bat` script in Visual Studio's VC build directory.
|
||||
|
||||
To configure cmake with Ninja generator,
|
||||
|
||||
hctbuild -s -ninja
|
||||
|
||||
To build with Ninja, go to the binary directory and run `ninja` directly or
|
||||
|
||||
hctbuild -b -ninja
|
||||
|
||||
## Running Tests
|
||||
|
||||
To run tests, open the HLSL Console and run this command after a successful build.
|
||||
|
@ -85,6 +99,8 @@ To run tests, open the HLSL Console and run this command after a successful buil
|
|||
|
||||
Some tests will run shaders and verify their behavior. These tests also involve a driver that can run these execute these shaders. See the next section on how this should be currently set up.
|
||||
|
||||
If you use Ninja to build the project, please make sure to supply `-ninja` to `hcttest` for testing.
|
||||
|
||||
## Running Shaders
|
||||
|
||||
To run shaders compiled as DXIL, you will need support from the operating system as well as from the driver for your graphics adapter.
|
||||
|
|
|
@ -255,16 +255,19 @@ if "%DO_SETUP%"=="1" (
|
|||
if "%DO_BUILD%"=="1" (
|
||||
rem Should add support for the non-x86-qualified programfiles.
|
||||
echo Building solution files for %2 with %1 configuration.
|
||||
if "%BUILD_VS_VER%"=="2015" (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" (
|
||||
call :buildvs_x86dir %1 %2 %3
|
||||
) else (
|
||||
cmake --build . --config %1
|
||||
if "%BUILD_GENERATOR%" NEQ "Ninja" (
|
||||
if "%BUILD_VS_VER%"=="2015" (
|
||||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" (
|
||||
call :buildvs_x86dir %1 %2 %3
|
||||
goto :donebuild
|
||||
)
|
||||
)
|
||||
) else (
|
||||
rem Just defer to cmake for now.
|
||||
cmake --build . --config %1
|
||||
)
|
||||
|
||||
rem Just defer to cmake for now.
|
||||
cmake --build . --config %1
|
||||
|
||||
:donebuild
|
||||
if errorlevel 1 (
|
||||
echo Failed to build projects.
|
||||
echo After fixing, run 'cmake --build --config %1 .' in %2
|
||||
|
|
Загрузка…
Ссылка в новой задаче