From 37bc5118ea8f5891741faba8963ce9ae5f88e946 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:38:23 -0500 Subject: CMake: Use precompiled headers --- src/common/CMakeLists.txt | 6 ++++++ src/common/precompiled_headers.h | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/common/precompiled_headers.h (limited to 'src/common') diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index b7c15c191..25fe5f56f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -95,6 +95,7 @@ add_library(common STATIC param_package.h parent_of_member.h point.h + precompiled_headers.h quaternion.h reader_writer_queue.h ring_buffer.h @@ -183,3 +184,8 @@ else() target_link_libraries(common PRIVATE $,zstd::libzstd_shared,zstd::libzstd_static>) 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/precompiled_headers.h b/src/common/precompiled_headers.h new file mode 100644 index 000000000..5f81bef98 --- /dev/null +++ b/src/common/precompiled_headers.h @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include + +#include + +#include "common/assert.h" -- cgit v1.2.3