build: make precompiled headers more useful

This can reduce the compilation time of a release
build (without tests) by more than 40%

Refs: #5212
Change-Id: I977aff0c0c7becbfee8a8b55605b81d0c014829b
This commit is contained in:
Davide Pesavento committed 2022-06-13 16:30:11 -04:00
1 parent 9a28c3f752
commit a9b09b6994
48 files changed
+143 -62

No files matched your search

+3 -3
View File
@@ -155,12 +155,10 @@ def build(bld):
bld.objects(
target='core-objects',
features='pch',
source=bld.path.find_node('core').ant_glob('*.cpp') + ['core/version.cpp'],
use='version.cpp version.hpp NDN_CXX BOOST LIBRT',
includes='.',
export_includes='.',
headers='core/common.hpp')
export_includes='.')
nfd_objects = bld.objects(
target='daemon-objects',
@@ -170,6 +168,8 @@ def build(bld):
'daemon/face/unix*.cpp',
'daemon/face/websocket*.cpp',
'daemon/main.cpp']),
features='pch',
headers='daemon/nfd-pch.hpp',
use='core-objects',
includes='daemon',
export_includes='daemon')