From 4f9e69eab0306e9508f86f7b052259b8b5b8bbca Mon Sep 17 00:00:00 2001 From: Nana Sakisaka <1901813+saki7@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:15:28 +0900 Subject: [PATCH] Enable precompiled header --- test/x4/CMakeLists.txt | 6 ++++++ test/x4/pch.cpp | 0 test/x4/pch.hpp | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 test/x4/pch.cpp create mode 100644 test/x4/pch.hpp diff --git a/test/x4/CMakeLists.txt b/test/x4/CMakeLists.txt index 47821e52d..9ef0da995 100644 --- a/test/x4/CMakeLists.txt +++ b/test/x4/CMakeLists.txt @@ -4,6 +4,11 @@ # Distributed under the Boost Software License, Version 1.0. # https://www.boost.org/LICENSE_1_0.txt +add_library(x4_test_pch OBJECT pch.cpp) +set_target_properties(x4_test_pch PROPERTIES CXX_EXTENSIONS OFF) +target_link_libraries(x4_test_pch PRIVATE Iris::X4 iris_cxx_test) +target_precompile_headers(x4_test_pch PUBLIC pch.hpp) + function(x4_define_test_headers test_name) iris_define_test_headers(x4_${test_name} PRIVATE FILE_SET HEADERS FILES ${ARGN}) endfunction() @@ -11,6 +16,7 @@ endfunction() function(x4_define_test test_name) iris_define_test(x4_${test_name} ${ARGN}) iris_define_test_headers(x4_${test_name} iris_x4_test.hpp) + target_precompile_headers(x4_${test_name}_test REUSE_FROM x4_test_pch) target_link_libraries(x4_${test_name}_test PRIVATE Iris::X4) set_target_properties(x4_${test_name}_test PROPERTIES FOLDER "test/x4") diff --git a/test/x4/pch.cpp b/test/x4/pch.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/test/x4/pch.hpp b/test/x4/pch.hpp new file mode 100644 index 000000000..20c4fba06 --- /dev/null +++ b/test/x4/pch.hpp @@ -0,0 +1,23 @@ +#ifndef IRIS_X4_TEST_PCH_HPP +#define IRIS_X4_TEST_PCH_HPP + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif