added unity build support

This commit is contained in:
2025-02-22 23:32:29 +03:00
parent ae87257adf
commit e31ffac103
2 changed files with 15 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
enable_testing()
project(unit-tests)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}")
include(GoogleTest)
add_executable(unit-tests
@@ -26,6 +25,15 @@ add_executable(unit-tests
)
set_target_properties(unit-tests PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/out/${CMAKE_BUILD_TYPE}"
UNITY_BUILD ON
UNITY_BUILD_BATCH_SIZE 20
CXX_STANDARD 23
CXX_STANDARD_REQUIRED ON)
target_link_libraries(unit-tests PRIVATE gtest gtest_main omath)
gtest_discover_tests(unit-tests)