Initial commit

This commit is contained in:
2025-01-18 17:24:36 +03:00
commit 453843f51a
28 changed files with 7356 additions and 0 deletions

29
unit/CMakeLists.txt Executable file
View File

@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.10)
# 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 all compiler warnings
if(MSVC)
target_compile_options(bhunit PRIVATE /W4 /WX)
else()
target_compile_options(bhunit PRIVATE -Wall -Wextra -Wpedantic -Werror)
endif()