summaryrefslogtreecommitdiff
path: root/Kernel/CMakeLists.txt
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-04-21 15:45:52 +0430
committerLinus Groh <mail@linusgroh.de>2021-04-21 14:29:46 +0200
commit468ac11f29c62ea4fbe2e1d3f231d53997539a1c (patch)
tree0da91748a89c0858673d95491e62334a16db3cd0 /Kernel/CMakeLists.txt
parentc4f682606a31fbd8f75cfd8e54a3997142e6e23d (diff)
downloadserenity-468ac11f29c62ea4fbe2e1d3f231d53997539a1c.zip
Meta: Add an option to precompile some very common AK headers
Until we get the goodness that C++ modules are supposed to be, let's try to shave off some parse time using precompiled headers. This commit only adds some very common AK headers, only to binaries, libraries and the kernel (tests are not covered due to incompatibility with AK/TestSuite.h). This option is on by default, but can be disabled by passing `-DPRECOMPILE_COMMON_HEADERS=OFF` to cmake, which will disable all header precompilations. This makes the build about 30 seconds faster on my machine (about 7%).
Diffstat (limited to 'Kernel/CMakeLists.txt')
-rw-r--r--Kernel/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 8b376c9749..3b9e4311ef 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -361,6 +361,7 @@ add_executable(Kernel ${SOURCES})
target_link_libraries(Kernel kernel_heap gcc stdc++)
add_dependencies(Kernel boot kernel_heap)
install(TARGETS Kernel RUNTIME DESTINATION boot)
+serenity_add_ak_precompiled_headers_to_target(Kernel)
add_custom_command(
TARGET Kernel