diff options
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ac3d254e..25703e9d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -82,8 +82,9 @@ if (MSVC) | |||
| 82 | /wd4324 # 'struct_name': structure was padded due to __declspec(align()) | 82 | /wd4324 # 'struct_name': structure was padded due to __declspec(align()) |
| 83 | ) | 83 | ) |
| 84 | 84 | ||
| 85 | if (USE_CCACHE) | 85 | if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) |
| 86 | # when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format | 86 | # when caching, we need to use /Z7 to downgrade debug info to use an older but more cachable format |
| 87 | # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 | ||
| 87 | add_compile_options(/Z7) | 88 | add_compile_options(/Z7) |
| 88 | else() | 89 | else() |
| 89 | add_compile_options(/Zi) | 90 | add_compile_options(/Zi) |
| @@ -151,6 +152,10 @@ else() | |||
| 151 | endif() | 152 | endif() |
| 152 | endif() | 153 | endif() |
| 153 | 154 | ||
| 155 | if (YUZU_USE_PRECOMPILED_HEADERS) | ||
| 156 | set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON) | ||
| 157 | endif() | ||
| 158 | |||
| 154 | add_subdirectory(common) | 159 | add_subdirectory(common) |
| 155 | add_subdirectory(core) | 160 | add_subdirectory(core) |
| 156 | add_subdirectory(audio_core) | 161 | add_subdirectory(audio_core) |