Merge pull request #9300 from ameerj/pch

CMake: Use precompiled headers to improve compile times
This commit is contained in:
liamwhite 2022-12-03 14:10:06 -05:00 committed by GitHub
commit 75e16547f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 174 additions and 5 deletions

View file

@ -82,8 +82,9 @@ if (MSVC)
/wd4324 # 'struct_name': structure was padded due to __declspec(align())
)
if (USE_CCACHE)
if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS)
# when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format
# Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21
add_compile_options(/Z7)
else()
add_compile_options(/Zi)