blob: f834aceb55902c41c141c455ea74dbdb20d5460b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
cmake_minimum_required(VERSION 3.1)
project(stc)
add_library(stc INTERFACE)
target_include_directories(stc INTERFACE include)
include(CTest)
if(BUILD_TESTING)
file(GLOB examples examples/*.c)
foreach(file IN LISTS examples)
get_filename_component(name "${file}" NAME_WE)
add_executable(${name} ${file})
target_link_libraries(${name} PRIVATE stc m)
add_test(NAME ${name} COMMAND ${name})
endforeach()
foreach(name IN ITEMS cdeq clist cmap csmap cvec)
add_executable(${name} benchmarks/${name}_benchmark.cpp)
target_link_libraries(${name} PRIVATE stc m)
add_test(NAME ${name} COMMAND ${name})
endforeach()
endif()
|