diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-02-25 00:05:19 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-02-25 00:05:19 +0100 |
commit | eac4bf825ab7cc0f423dd11a6dea85ad3563af66 (patch) | |
tree | 2218b9d7ef686a192b93bd0e7183d89a6725f020 /cmake/macros | |
parent | c4f896f5910ba64f2bfa4fe575c562deac06e9fb (diff) |
Build: Reuse PCH file between all script modules
Diffstat (limited to 'cmake/macros')
-rw-r--r-- | cmake/macros/FindPCHSupport.cmake | 6 |
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) |