foreach(_req IN ITEMS Core Functional Containers Math Time Binary Data) if(NOT TARGET Void::${_req}) message(FATAL_ERROR "[Void] VOID_ENABLE_BENCHMARKS=ON requires foundation module '${_req}' to be enabled") endif() endforeach() set(_void_git_rev "unknown") find_package(Git QUIET) if(GIT_FOUND) execute_process( COMMAND "${GIT_EXECUTABLE}" rev-parse --short=12 HEAD WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE _git_out OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET ) if(_git_out) set(_void_git_rev "${_git_out}") endif() endif() add_executable(VoidFoundationBench FoundationBench.cpp) set_target_properties(VoidFoundationBench PROPERTIES CXX_STANDARD 26 CXX_STANDARD_REQUIRED ON CXX_EXTENSIONS OFF VOID_TESTING_NO_AUTO_SCAN TRUE ) target_link_libraries(VoidFoundationBench PRIVATE Void::Core Void::Functional Void::Containers Void::Math Void::Time Void::Binary Void::Data ) target_compile_definitions(VoidFoundationBench PRIVATE VOID_GIT_REVISION="${_void_git_rev}" VOID_BUILD_TYPE="$,${CMAKE_BUILD_TYPE},unspecified>" ) if(VOID_WARNINGS_AS_ERRORS) target_compile_options(VoidFoundationBench PRIVATE "$<$:-Wall;-Wextra;-Wpedantic;-Werror;-Wno-missing-field-initializers>" "$<$:-Wno-missing-designated-field-initializers>" "$<$:/W4;/WX>" ) endif()