Skip to content

Commit b22168a

Browse files
committed
build: Add router CMakeLists.txt
1 parent 42c5da3 commit b22168a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Diff for: src/router/CMakeLists.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
add_custom_target(
3+
router-all ALL
4+
DEPENDS router)
5+
6+
add_custom_command(
7+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/router
8+
COMMAND go build -o ${CMAKE_CURRENT_BINARY_DIR}/router
9+
DEPENDS
10+
${CMAKE_CURRENT_SOURCE_DIR}/main.go
11+
${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/client.go
12+
${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/data.go
13+
${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/router.go
14+
${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/ipimplementation_string.go
15+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
16+
COMMENT "Building router")
17+
18+
add_custom_command(
19+
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/ipimplementation_string.go
20+
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/iptype_string.go
21+
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/sw_axi/wire
22+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../common/IpcStructs.fbs sw_axi/data.go
23+
COMMAND go generate router/...
24+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
25+
COMMENT "Generating source for router"
26+
)

0 commit comments

Comments
 (0)