mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
468ac11f29
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%).
9 lines
405 B
CMake
9 lines
405 B
CMake
function(serenity_add_precompiled_header_to_target target header)
|
|
if (PRECOMPILE_COMMON_HEADERS AND COMMAND target_precompile_headers)
|
|
target_precompile_headers(${target} PRIVATE ${header})
|
|
endif ()
|
|
endfunction()
|
|
|
|
function(serenity_add_ak_precompiled_headers_to_target target)
|
|
serenity_add_precompiled_header_to_target(${target} ${CMAKE_SOURCE_DIR}/Meta/Precompile/AK.h)
|
|
endfunction()
|