aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-06-11 21:13:38 +0200
committerShauren <shauren.trinity@gmail.com>2025-06-11 21:13:38 +0200
commit1dc114148050365094fd538dc6ffba52566fb99c (patch)
tree0dcf6049f71f250d785983e60b11f9c4c819f372
parentdcb2857f38a51f0d8742614fa16d78ed9b4e014f (diff)
Dep/Protobuf: Enable PCH
-rw-r--r--dep/protobuf/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/dep/protobuf/CMakeLists.txt b/dep/protobuf/CMakeLists.txt
index c1465b73c7f..cce1181568a 100644
--- a/dep/protobuf/CMakeLists.txt
+++ b/dep/protobuf/CMakeLists.txt
@@ -106,3 +106,17 @@ if (BUILD_SHARED_LIBS)
DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
endif()
+
+# Generate precompiled header
+if(USE_COREPCH)
+ list(APPEND protobuf_PCH_HEADERS
+ <google/protobuf/descriptor.pb.h>
+ <google/protobuf/io/coded_stream.h>
+ <google/protobuf/wire_format.h>
+ <google/protobuf/stubs/hash.h>
+ <google/protobuf/stubs/strutil.h>
+ <algorithm>
+ <memory>)
+
+ add_cxx_pch(protobuf "${protobuf_PCH_HEADERS}")
+endif()