Building with Clang on Windows
You can build ezEngine using the Clang front-end on Windows through Visual Studio. This can be useful to find and fix compilation errors and warnings, that do not happen with MSVC. However, as Clang support on Windows is still experimental, you may not be able to build a working executable.
Using the CMake GUI
- Create a new solution for the Clang build by pointing Where to build the binaries to a new location.
- Press Configure once, a dialog will show up.
- Choose the desired Visual Studio generator at the top.
- In the field Optional toolset to use (argument to -T) type v140_clang_c2
- Finish the dialog and run ‘Configure’.
- Check the Advanced checkbox to show additional options.
- Disable EZ_USE_PCH, as the Clang build will not work with precompiled headers.
- You may also want to disable EZ_ENABLE_FOLDER_UNITY_FILES as that makes it easier to see from which file a compilation error originated.
- Finish the CMake configuration, open the solution in Visual Studio and start compiling.