aboutsummaryrefslogtreecommitdiff
path: root/cmake/macros/FindPCHSupport.cmake
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-02-25 00:05:19 +0100
committerShauren <shauren.trinity@gmail.com>2024-02-25 00:05:19 +0100
commiteac4bf825ab7cc0f423dd11a6dea85ad3563af66 (patch)
tree2218b9d7ef686a192b93bd0e7183d89a6725f020 /cmake/macros/FindPCHSupport.cmake
parentc4f896f5910ba64f2bfa4fe575c562deac06e9fb (diff)
Build: Reuse PCH file between all script modules
Diffstat (limited to 'cmake/macros/FindPCHSupport.cmake')
-rw-r--r--cmake/macros/FindPCHSupport.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake
index 46520e4a2d6..b1c911a7c13 100644
--- a/cmake/macros/FindPCHSupport.cmake
+++ b/cmake/macros/FindPCHSupport.cmake
@@ -18,3 +18,9 @@ function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
target_precompile_headers(${TARGET_NAME} PRIVATE ${PCH_HEADER})
endforeach()
endfunction(ADD_CXX_PCH)
+
+function(REUSE_CXX_PCH TARGET_NAME_LIST REUSE_FROM_TARGET_NAME)
+ foreach(TARGET_NAME ${TARGET_NAME_LIST})
+ target_precompile_headers(${TARGET_NAME} REUSE_FROM ${REUSE_FROM_TARGET_NAME})
+ endforeach()
+endfunction(REUSE_CXX_PCH)