add google benchmark for the future

This commit is contained in:
BlackMATov
2023-02-09 22:47:27 +07:00
parent 9a1a2cf8cb
commit 6c4d4cdf73
11 changed files with 203 additions and 32 deletions

View File

@@ -1,10 +1,6 @@
add_library(${PROJECT_NAME}.setup_targets INTERFACE)
add_library(${PROJECT_NAME}::setup_targets ALIAS ${PROJECT_NAME}.setup_targets)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
meta.hpp.vendors::doctest
meta.hpp.vendors::fmt)
target_compile_options(${PROJECT_NAME}.setup_targets INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:
/WX /W4>
@@ -15,6 +11,7 @@ target_compile_options(${PROJECT_NAME}.setup_targets INTERFACE
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-exit-time-destructors
-Wno-global-constructors
-Wno-padded
-Wno-unneeded-internal-declaration
-Wno-unused-macros
@@ -23,26 +20,13 @@ target_compile_options(${PROJECT_NAME}.setup_targets INTERFACE
-Wno-zero-as-null-pointer-constant
>)
if(BUILD_WITH_COVERAGE)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
meta.hpp::enable_gcov)
endif()
if(BUILD_WITH_SANITIZERS)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
$<$<BOOL:${BUILD_WITH_COVERAGE}>:
meta.hpp::enable_gcov>
$<$<BOOL:${BUILD_WITH_SANITIZERS}>:
meta.hpp::enable_asan
meta.hpp::enable_ubsan)
endif()
if(BUILD_WITH_NO_EXCEPTIONS)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
meta.hpp::disable_exceptions)
target_compile_definitions(${PROJECT_NAME}.setup_targets INTERFACE
DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS)
endif()
if(BUILD_WITH_NO_RTTI)
target_link_libraries(${PROJECT_NAME}.setup_targets INTERFACE
meta.hpp::disable_rtti)
endif()
meta.hpp::enable_ubsan>
$<$<BOOL:${BUILD_WITH_NO_EXCEPTIONS}>:
meta.hpp::disable_exceptions>
$<$<BOOL:${BUILD_WITH_NO_RTTI}>:
meta.hpp::disable_rtti>)