forked from abs-tudelft/fletcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
65 lines (55 loc) · 1.27 KB
/
Copy pathCMakeLists.txt
File metadata and controls
65 lines (55 loc) · 1.27 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(fletcher VERSION 0.0.10 LANGUAGES CXX)
find_package(arrow 0.15 CONFIG REQUIRED)
include(FetchContent)
FetchContent_Declare(cmake-modules
GIT_REPOSITORY https://github.com/abs-tudelft/cmake-modules.git
GIT_TAG master
)
FetchContent_MakeAvailable(cmake-modules)
include(CompileUnits)
set(TEST_PLATFORM_DEPS)
if(BUILD_TESTS)
if(NOT TARGET fletcher::echo)
add_subdirectory(../../platforms/echo/runtime echo)
endif()
list(APPEND TEST_PLATFORM_DEPS "fletcher::echo")
if(UNIX AND NOT APPLE)
list(APPEND TEST_PLATFORM_DEPS "-Wl,--disable-new-dtags")
endif()
endif()
if(NOT TARGET fletcher::common)
add_subdirectory(../../common/cpp common)
endif()
if(NOT TARGET fletcher::c)
add_subdirectory(../../common/c c)
endif()
add_compile_unit(
NAME fletcher
TYPE SHARED
PRPS
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
SRCS
src/fletcher/platform.cc
src/fletcher/context.cc
src/fletcher/kernel.cc
DEPS
fletcher::c
fletcher::common
arrow_shared
${CMAKE_DL_LIBS}
)
add_compile_unit(
NAME fletcher::test
TYPE TESTS
PRPS
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
SRCS
test/fletcher/test.cpp
DEPS
fletcher
${TEST_PLATFORM_DEPS}
)
compile_units()