CMake supports passing in CMake scripts via the `-C` command line
option, which can set CMake cache variables to initialize options
before the first CMakeLists file is processed. This is a portable and
shell-agnostic way of supporting what the
`cmake-predefined-config-params` file is used for.
* Use D3D12 headers from the same Windows 10 SDK version as cmake is using (cmake variable CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
* For ARM64EC builds detect SDK version from VSDevCmd environment variable instead of a fixed version in hctbuild.cmd
* Add option -show-cmake-log to hctbuild and enable it in AppVeyor
This PR is switching the default build of DXC to Visual Studio 2019.
The build script hctbuild.cmd will error when VS2019 is not installed. Use -vs2017 option to build with VS2017.
VS2015 is no longer supported.
Removes cmake version checking from hctstart.cmd
Fixes cmake detection in Visual Studio installations
Fixes DIA SDK lookup - use CMAKE_GENERATOR to detect VS version used and select the corresponding DIA SDK
Use environment variable instead of c:\Program Files
This fixes up the last of the clang errors that are unique to clang 10.
These take two forms, First, indentation that might indicate the mistaken
impression that a line is within an unbraced conditional block produces
a warning and is corrected in a few places. Second, a warning is
produced when a class has one of copy constructor or assignment operator
explicitly defined and the other left to implicit definition. The
solution is generally to add a definition with the = default assignment.
Finally, this adds the -Werror flag to all clang builds to keep the
build warnings clean and detect flaws that can affect all builds and
platforms.
* Added effcee and its dependencies (re2) to the project.
* Introduced FileTest that uses effcee to perform checks.
* Added a sample test (check-entrypoint.hlsl)
* Refactored code so WholeFileTest and FileTest can reuse code.
This change enables CodeGenSPIRV test flow.
New tests can be added by simply adding the test file to
`tools/clang/test/CodeGenSPIRV/` directory and running:
```cpp
TEST_F(WholeFileTest, NewTest) {
EXPECT_TRUE(runWholeFileTest("new-test-name"));
}
```
The input file with the format described in `WholeFileCheck.h` is read in;
the HLSL portion is passed to the compiler with SPIR-V codegen enabled.
The resulting SPIR-V binary is disassembled and compared to the expected
result in the input file.
This commit makes the necessary changes to run the project with AppVeyor
CI. The `appveyor.yml` file contains the configuration settings for the
build. Currently we only build x64-Debug, but we can build the full
x32/x64-Debug/Release matrix by adding a few lines to the config.
The remaining changes are somewhat tied to the specifics of how appveyor
provisions the build machines. The standard VS2015 machines build on
Windows Server 2012. We can build on these machines, but cannot run tests
because we require d3d12.dll which is not available on Windows Server
2012. However, it is present on Windows Server 2016, but appveyor only
provides VS2017 on those machines. So part of the changes are to allow
the compiler to build with VS2017 so we can run tests as part of CI.
The `appveyor_setup.ps1` script installs the WDK as part of the build.
This is the only extra software we need. It is actually installed on the
VS2015 build machines, but not our VS2017 build machines. Perhaps we can
get them to install it by default and then this script can go away.
The `appveyor_test.ps1` script runs the taef tests and then reports the
results to appveyor so they can be displayed on the "Tests" tab.
As a side effect of this work, We can now use the latest cmake (3.7.2) for
our own builds! The key seems to be setting
`-DCMAKE_SYSTEM_VERSION=10.0.14393.0` to ensure that we pick up the
correct SDK.