build: compile time optimizations

This commit is contained in:
Eric Wasylishen 2022-10-26 21:27:48 -06:00
parent 34f32f851c
commit 53a0be5e50
2 changed files with 22 additions and 0 deletions

View File

@ -51,13 +51,33 @@ target_link_libraries(common ${CMAKE_THREAD_LIBS_INIT} TBB::tbb TBB::tbbmalloc f
target_precompile_headers(common INTERFACE target_precompile_headers(common INTERFACE
<filesystem> <filesystem>
<functional>
<array> <array>
<any>
<bitset>
<cassert>
<cinttypes>
<cstdarg>
<iostream>
<fstream>
<list> <list>
<mutex>
<vector> <vector>
<set> <set>
<unordered_set> <unordered_set>
<map> <map>
<unordered_map> <unordered_map>
<memory> <memory>
<optional>
<sstream>
<string>
<shared_mutex>
<type_traits>
<variant> <variant>
<fmt/core.h>
<tbb/scalable_allocator.h>
<tbb/task_group.h>
<tbb/task_group.h>
<tbb/parallel_for.h>
<tbb/parallel_for_each.h>
) )

View File

@ -29,6 +29,8 @@ endif()
target_link_libraries(tests libqbsp liblight libvis common TBB::tbb TBB::tbbmalloc doctest::doctest fmt::fmt nanobench::nanobench) target_link_libraries(tests libqbsp liblight libvis common TBB::tbb TBB::tbbmalloc doctest::doctest fmt::fmt nanobench::nanobench)
target_compile_definitions(tests PRIVATE DOCTEST_CONFIG_SUPER_FAST_ASSERTS)
# HACK: copy .dll dependencies # HACK: copy .dll dependencies
add_custom_command(TARGET tests POST_BUILD add_custom_command(TARGET tests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:embree>" "$<TARGET_FILE_DIR:tests>" COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:embree>" "$<TARGET_FILE_DIR:tests>"