mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
libstore-tests: Improve compile times with PCH
(Before) **** Time summary: Compilation (25 times): Parsing (frontend): 145.5 s Codegen & opts (backend): 65.9 s (After) **** Time summary: Compilation (26 times): Parsing (frontend): 39.9 s Codegen & opts (backend): 55.1 s
This commit is contained in:
parent
347ed8d9ba
commit
8be1cc6e96
2 changed files with 11 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ this_exe = executable(
|
|||
link_args : linker_export_flags + [ '-lrapidcheck' ],
|
||||
# get main from gtest
|
||||
install : true,
|
||||
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
|
||||
)
|
||||
|
||||
test(
|
||||
|
|
@ -127,6 +128,7 @@ if get_option('benchmarks')
|
|||
include_directories : include_dirs,
|
||||
link_args : linker_export_flags,
|
||||
install : true,
|
||||
cpp_pch : do_pch ? [ 'pch/precompiled-headers.hh' ] : [],
|
||||
cpp_args : [
|
||||
'-DNIX_UNIT_TEST_DATA="' + meson.current_source_dir() + '/data"',
|
||||
],
|
||||
|
|
|
|||
9
src/libstore-tests/pch/precompiled-headers.hh
Normal file
9
src/libstore-tests/pch/precompiled-headers.hh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include "nix/store/store-api.hh"
|
||||
#include "nix/store/tests/libstore.hh"
|
||||
#include "nix/util/util.hh"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <rapidcheck/gtest.h>
|
||||
|
||||
#include <regex>
|
||||
Loading…
Add table
Add a link
Reference in a new issue