-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
32 lines (25 loc) · 929 Bytes
/
CMakeLists.txt
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
set (FTT_ARCH_SRCS
main.cpp
fixed_three_tables.cpp
ftt_midend/ftt_midend.cpp
ftt_midend/ftt_table_id.cpp
)
set (FTT_ATCH_HDRS
fixed_three_tables.h
ftt_midend/ftt_midend.h
ftt_midend/ftt_table_id.h
)
add_cpplint_files (${CMAKE_CURRENT_SOURCE_DIR} "${FTT_ARCH_SRCS};${FTT_ARCH_HDRS}")
add_executable(p4c-ftt ${FTT_ARCH_SRCS})
target_link_libraries (p4c-ftt ${P4C_LIBRARIES} ${P4C_LIB_DEPS})
add_dependencies(p4c-ftt genIR)
install (TARGETS p4c-ftt
RUNTIME DESTINATION ${P4C_RUNTIME_OUTPUT_DIRECTORY})
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/p4include
DESTINATION ${P4C_ARTIFACTS_OUTPUT_DIRECTORY})
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/driver/p4c.ftt.cfg
DESTINATION ${P4C_ARTIFACTS_OUTPUT_DIRECTORY}/p4c_src)
add_custom_target(linkbinary
COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_BINARY_DIR}/p4c-ftt ${P4C_BINARY_DIR}/p4c-ftt
)
add_dependencies(p4c_driver linkbinary)