aboutsummaryrefslogtreecommitdiff
path: root/timer/CMakeLists.txt
blob: fb300a0002184c086f7e9d469d5267b858eee9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
cmake_minimum_required(VERSION 3.5)

project(timer)

set(CMAKE_C_STANDARD 23)
set(CMAKE_C_STANDARD_REQUIRED On)
set(CMAKE_C_EXTENSIONS Off)

# Library

set(SRC
  src/timer.c)

add_library(timer ${SRC})

target_include_directories(timer PUBLIC include)

target_compile_options(timer PRIVATE -Wall -Wextra)

# Test

add_executable(timer_test
  test/timer_test.c)

target_link_libraries(timer_test timer)

target_compile_options(timer_test PRIVATE -DUNIT_TEST -DNDEBUG -Wall -Wextra)