From 5b5612c1cc1ef7a4888e7c45e41b15433127a2e5 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Tue, 29 Nov 2022 23:22:03 -0500 Subject: [PATCH] CMake: Consolidate common PCH headers --- src/audio_core/precompiled_headers.h | 8 +------- src/common/CMakeLists.txt | 2 +- src/common/common_precompiled_headers.h | 14 ++++++++++++++ src/common/precompiled_headers.h | 8 +------- src/core/precompiled_headers.h | 9 +++------ src/dedicated_room/precompiled_headers.h | 8 +------- src/input_common/precompiled_headers.h | 8 +------- src/network/precompiled_headers.h | 8 +------- src/shader_recompiler/precompiled_headers.h | 8 +------- src/tests/precompiled_headers.h | 8 +------- src/video_core/precompiled_headers.h | 8 +------- src/web_service/precompiled_headers.h | 8 +------- src/yuzu/precompiled_headers.h | 8 +------- src/yuzu_cmd/precompiled_headers.h | 8 +------- 14 files changed, 29 insertions(+), 84 deletions(-) create mode 100644 src/common/common_precompiled_headers.h diff --git a/src/audio_core/precompiled_headers.h b/src/audio_core/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/audio_core/precompiled_headers.h +++ b/src/audio_core/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 25fe5f56fa..a12edc584c 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -37,6 +37,7 @@ add_library(common STATIC cache_management.cpp cache_management.h common_funcs.h + common_precompiled_headers.h common_types.h concepts.h div_ceil.h @@ -187,5 +188,4 @@ endif() if (YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(common PRIVATE precompiled_headers.h) - set(CMAKE_PCH_INSTANTIATE_TEMPLATES ON) endif() diff --git a/src/common/common_precompiled_headers.h b/src/common/common_precompiled_headers.h new file mode 100644 index 0000000000..be7e5b5f94 --- /dev/null +++ b/src/common/common_precompiled_headers.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include +#include + +#include + +#include "common/assert.h" +#include "common/common_types.h" diff --git a/src/common/precompiled_headers.h b/src/common/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/common/precompiled_headers.h +++ b/src/common/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/core/precompiled_headers.h b/src/core/precompiled_headers.h index d224877ea9..30a31001de 100644 --- a/src/core/precompiled_headers.h +++ b/src/core/precompiled_headers.h @@ -3,12 +3,9 @@ #pragma once -#include -#include -#include - #include // used by service.h which is heavily included #include // used by k_auto_object.h which is heavily included -#include -#include "common/assert.h" +#include "common/common_precompiled_headers.h" + +#include "core/hle/kernel/k_process.h" diff --git a/src/dedicated_room/precompiled_headers.h b/src/dedicated_room/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/dedicated_room/precompiled_headers.h +++ b/src/dedicated_room/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/input_common/precompiled_headers.h b/src/input_common/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/input_common/precompiled_headers.h +++ b/src/input_common/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/network/precompiled_headers.h b/src/network/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/network/precompiled_headers.h +++ b/src/network/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/shader_recompiler/precompiled_headers.h b/src/shader_recompiler/precompiled_headers.h index bd8f64a2e3..5dd6b7eca3 100644 --- a/src/shader_recompiler/precompiled_headers.h +++ b/src/shader_recompiler/precompiled_headers.h @@ -3,11 +3,5 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" #include "frontend/maxwell/translate/impl/impl.h" diff --git a/src/tests/precompiled_headers.h b/src/tests/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/tests/precompiled_headers.h +++ b/src/tests/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/video_core/precompiled_headers.h b/src/video_core/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/video_core/precompiled_headers.h +++ b/src/video_core/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/web_service/precompiled_headers.h b/src/web_service/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/web_service/precompiled_headers.h +++ b/src/web_service/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/yuzu/precompiled_headers.h b/src/yuzu/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/yuzu/precompiled_headers.h +++ b/src/yuzu/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h" diff --git a/src/yuzu_cmd/precompiled_headers.h b/src/yuzu_cmd/precompiled_headers.h index 5f81bef98c..aabae730bf 100644 --- a/src/yuzu_cmd/precompiled_headers.h +++ b/src/yuzu_cmd/precompiled_headers.h @@ -3,10 +3,4 @@ #pragma once -#include -#include -#include - -#include - -#include "common/assert.h" +#include "common/common_precompiled_headers.h"