Add benchmarks, change project structure
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user