microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.49k stars 396 forks source link

CMake updated to use /Zc:inline and /Zc:lambda #143

Closed walbourn closed 1 year ago

walbourn commented 1 year ago

The /Zc:inline switch enforces C++11 rules on inline visibility which reduces redundant comdats in each OBJ file (i.e. all the DirectXMath inline functions you didn't call in that translation unit). This switch is on by default with MSBuild, but is not on by default for command-line builds. This update adds this switch to CMake builds as well.

This reduces the size of the Release obj/lib files in half.

There's also a /Zc:lambda conformance switch for VS 2019 16.8 or later which I'm enabling for coverage.

walbourn commented 1 year ago

Related updates for test suite: https://github.com/walbourn/directxtk12test/commit/0db17e0957d4c75824145992cb9af7c4c0ae908b https://github.com/walbourn/directxtk12test/commit/c00b0b7f45041302821018e03358634d1d8396cf