Add benchmarks, change project structure

This commit is contained in:
2025-10-12 10:20:09 +03:00
parent b1870bd709
commit 364d3a32ec
45 changed files with 323 additions and 51 deletions

View File

@@ -1,13 +1,30 @@
# Project and C standard configuration
project(bhunit LANGUAGES C)
set(CMAKE_C_STANDARD 90)
set(CMAKE_C_STANDARD_REQUIRED ON)
# Disable extensions
set(CMAKE_C_EXTENSIONS OFF)
# Library code
set(BHUNIT_SOURCE
src/Unit.c
)
set(BHUNIT_HEADER
include/BH/Unit.h
)
# Library
add_library(BHUnit STATIC ${BHUNIT_SOURCE} ${BHUNIT_HEADER})
target_include_directories(BHUnit PUBLIC include)
# Enable testing
include(CTest)
enable_testing()
# Search files
file(GLOB TEST_FILES "src/*.c")
file(GLOB TEST_FILES "tests/*.c")
foreach(TEST_FILENAME ${TEST_FILES})
# Add test