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
61 lines (51 loc) · 2.21 KB
/
Copy pathCMakeLists.txt
File metadata and controls
61 lines (51 loc) · 2.21 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
cmake_minimum_required(VERSION 3.10)
# Tests for any subproject
option(FLETCHER_TESTS "Build tests." OFF)
if (FLETCHER_TESTS)
enable_testing()
endif()
########################################################################################################################
# Runtimes
########################################################################################################################
# CPP runtime
option(FLETCHER_CPP "Build Fletcher C++ run-time library" ON)
if (FLETCHER_CPP)
add_subdirectory(runtime/cpp)
endif()
########################################################################################################################
# Platforms:
########################################################################################################################
# Echo: the default platform that just outputs your fpga interactions on stdout
option(FLETCHER_ECHO "Build with ECHO support (simulating platform interface on STDOUT)" ON)
if (FLETCHER_ECHO)
message("[FLETCHER] Building \"echo\" platform")
add_subdirectory(platforms/echo/runtime)
endif ()
# AWS EC2 f1
option(FLETCHER_AWS "Build with AWS EC2 f1 support." OFF)
if (FLETCHER_AWS)
message("[FLETCHER] Building AWS EC2 f1 support...")
add_subdirectory(platforms/aws-f1/runtime)
endif ()
# OpenPOWER SNAP
option(FLETCHER_SNAP "Build with OpenPOWER SNAP support." OFF)
if (FLETCHER_SNAP)
message("[FLETCHER] Building with SNAP support...")
add_subdirectory(platforms/snap/runtime)
endif ()
########################################################################################################################
# Tools
########################################################################################################################
# Fletcher wrapper generator
option(FLETCHER_GEN "Build with Fletchgen - Fletcher's HDL wrapper generator." ON)
if (FLETCHER_GEN)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
message(WARNING "Skipping Fletchgen compilation. This requires a GCC version of 4.9+")
else ()
add_subdirectory(codegen/fletchgen)
endif ()
else ()
add_subdirectory(codegen/fletchgen)
endif ()
endif ()