From 8f58e5a3ec0e4a15fc8ae0911cc864f5dbf86c6e Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Fri, 18 Aug 2017 15:56:55 +0200 Subject: build: Revise the build system This revises the build system to have configuration per system component. System settings can now be set using cmake. The standard compliance defines were removed from configuration header and are set in the sources where needed. Also some small code refactors, such as moving the data for shims out of the ipcp structure to the respective shims were performed. --- src/ipcpd/normal/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/ipcpd/normal/CMakeLists.txt') diff --git a/src/ipcpd/normal/CMakeLists.txt b/src/ipcpd/normal/CMakeLists.txt index 8c2d4efc..7a40e94c 100644 --- a/src/ipcpd/normal/CMakeLists.txt +++ b/src/ipcpd/normal/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(${CURRENT_BINARY_PARENT_DIR}) include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) -set(IPCP_NORMAL_TARGET ipcpd-normal CACHE STRING "IPCP_NORMAL_TARGET") +set(IPCP_NORMAL_TARGET ipcpd-normal CACHE INTERNAL "") protobuf_generate_c(FLOW_ALLOC_SRCS FLOW_ALLOC_HDRS flow_alloc.proto) protobuf_generate_c(KAD_PROTO_SRCS KAD_PROTO_HDRS kademlia.proto) @@ -20,6 +20,10 @@ protobuf_generate_c(KAD_PROTO_SRCS KAD_PROTO_HDRS kademlia.proto) # Add GPB sources of policies last protobuf_generate_c(FSO_SRCS FSO_HDRS pol/fso.proto) +math(EXPR PFT_EXPR "1 << 12") +set(PFT_SIZE ${PFT_EXPR} CACHE STRING + "Size of the PDU forwarding table") + set(SOURCE_FILES # Add source files here addr_auth.c @@ -56,4 +60,7 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ipcpd-normal RUNTIME DESTINATION sbin) add_subdirectory(pol/tests) -add_subdirectory(tests) + +if (NOT GNU) + add_subdirectory(tests) +endif () -- cgit v1.2.3