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