diff options
author | Sander Vrijders <[email protected]> | 2017-03-03 15:01:50 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-03-03 15:01:50 +0100 |
commit | 2852bb1bac8fcc111364d516c2bd31628ad264c7 (patch) | |
tree | 58fa873269b656272f3628c5dd1777270b988455 | |
parent | 13e438d5bc2350cf3d71a77f6d3c5a54ba436161 (diff) | |
download | ouroboros-2852bb1bac8fcc111364d516c2bd31628ad264c7.tar.gz ouroboros-2852bb1bac8fcc111364d516c2bd31628ad264c7.zip |
build: Format CMakeLists.txt files
The CMakeLists files are now properly indented.
-rw-r--r-- | CMakeLists.txt | 16 | ||||
-rw-r--r-- | cmake/AddCompileFlags.cmake (renamed from cmake/MacroAddCompileFlags.cmake) | 6 | ||||
-rw-r--r-- | cmake/CmakeUninstall.cmake.in (renamed from cmake/cmake_uninstall.cmake.in) | 0 | ||||
-rw-r--r-- | cmake/CompilerUtils.cmake | 2 | ||||
-rw-r--r-- | cmake/FindProtobufC.cmake | 44 | ||||
-rw-r--r-- | cmake/GitVersionGen.cmake | 58 | ||||
-rw-r--r-- | src/ipcpd/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/ipcpd/local/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/ipcpd/normal/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/ipcpd/shim-eth-llc/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/ipcpd/shim-udp/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/ipcpd/tests/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/irmd/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/lib/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/lib/tests/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/nsmd/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/tools/cbr/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tools/echo/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tools/irm/CMakeLists.txt | 42 | ||||
-rw-r--r-- | src/tools/operf/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tools/oping/CMakeLists.txt | 6 |
21 files changed, 167 insertions, 169 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 52c82a80..e6c33c16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") project(ouroboros C) include(GitVersionGen) -GIT_VERSION_GEN() +git_version_gen() include(GNUInstallDirs) @@ -23,11 +23,11 @@ set(CMAKE_SKIP_BUILD_RPATH FALSE) set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES +list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/usr/lib" isSystemDir) -IF("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/usr/lib") -ENDIF("${isSystemDir}" STREQUAL "-1") +IF ("${isSystemDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/usr/lib") +ENDIF ("${isSystemDir}" STREQUAL "-1") message(STATUS "Package name is: ${PACKAGE_NAME}") message(STATUS "Package description is: ${PACKAGE_DESCRIPTION}") @@ -86,12 +86,12 @@ add_subdirectory(include) # Uninstall target configure_file( - "${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" - "${CMAKE_BINARY_DIR}/cmake/cmake_uninstall.cmake" + "${CMAKE_SOURCE_DIR}/cmake/CmakeUninstall.cmake.in" + "${CMAKE_BINARY_DIR}/cmake/CmakeUninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/cmake_uninstall.cmake) + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/cmake/CmakeUninstall.cmake) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_DESCRIPTION}") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") diff --git a/cmake/MacroAddCompileFlags.cmake b/cmake/AddCompileFlags.cmake index 41f3797c..8f3877d9 100644 --- a/cmake/MacroAddCompileFlags.cmake +++ b/cmake/AddCompileFlags.cmake @@ -3,10 +3,8 @@ # Copyright (c) 2006, Oswald Buddenhagen, <[email protected]> # # Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -macro(MACRO_ADD_COMPILE_FLAGS _target _flg) +macro(add_compile_flags _target _flg) get_target_property(_flags ${_target} COMPILE_FLAGS) if (_flags) @@ -16,4 +14,4 @@ macro(MACRO_ADD_COMPILE_FLAGS _target _flg) endif (_flags) set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "${_flags}") -endmacro(MACRO_ADD_COMPILE_FLAGS) +endmacro(add_compile_flags) diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/CmakeUninstall.cmake.in index 4c07dc7b..4c07dc7b 100644 --- a/cmake/cmake_uninstall.cmake.in +++ b/cmake/CmakeUninstall.cmake.in diff --git a/cmake/CompilerUtils.cmake b/cmake/CompilerUtils.cmake index 5cea44b6..fb81b7e7 100644 --- a/cmake/CompilerUtils.cmake +++ b/cmake/CompilerUtils.cmake @@ -9,7 +9,7 @@ function(test_and_set_c_compiler_flag_global _flag) message(STATUS "Compiler supports flag ${_flag}, added globally") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}" PARENT_SCOPE) else(${_retval}) - message(STATUS "Compiler does not support flag ${_flag}, discarded") + message(STATUS "Compiler does not support flag ${_flag}, discarded") endif() endfunction(test_and_set_c_compiler_flag_global) diff --git a/cmake/FindProtobufC.cmake b/cmake/FindProtobufC.cmake index 6b81d751..ff532a46 100644 --- a/cmake/FindProtobufC.cmake +++ b/cmake/FindProtobufC.cmake @@ -1,22 +1,22 @@ function(PROTOBUF_GENERATE_C SRCS HDRS) - if(NOT ARGN) + if (NOT ARGN) message(SEND_ERROR "Error: PROTOBUF_GENERATE_C() called without any proto files") return() - endif() + endif () - if(PROTOBUF_GENERATE_C_APPEND_PATH) + if (PROTOBUF_GENERATE_C_APPEND_PATH) # Create an include path for each file specified - foreach(FIL ${ARGN}) + foreach (FIL ${ARGN}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(ABS_PATH ${ABS_FIL} PATH) list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) - if(${_contains_already} EQUAL -1) - list(APPEND _protobuf_include_path -I ${ABS_PATH}) - endif() - endforeach() - else() + if (${_contains_already} EQUAL -1) + list(APPEND _protobuf_include_path -I ${ABS_PATH}) + endif () + endforeach () + else () set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) - endif() + endif () set(${SRCS}) set(${HDRS}) @@ -29,7 +29,7 @@ function(PROTOBUF_GENERATE_C SRCS HDRS) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.c" - "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h" + "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h" COMMAND ${PROTOBUF_PROTOC_C_EXECUTABLE} ARGS --c_out=${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_C_EXECUTABLE} @@ -44,31 +44,31 @@ endfunction() # By default have PROTOBUF_GENERATE_C macro pass -I to protoc # for each directory where a proto file is referenced. -if(NOT DEFINED PROTOBUF_GENERATE_C_APPEND_PATH) +if (NOT DEFINED PROTOBUF_GENERATE_C_APPEND_PATH) set(PROTOBUF_GENERATE_C_APPEND_PATH TRUE) -endif() +endif () # Find library find_library(PROTOBUF_C_LIBRARY - NAMES libprotobuf-c.so libprotobuf-c libprotobuf-c.dylib -) + NAMES libprotobuf-c.so libprotobuf-c libprotobuf-c.dylib + ) mark_as_advanced(PROTOBUF_C_LIBRARY) # Find the include directory find_path(PROTOBUF_C_INCLUDE_DIR - google/protobuf-c/protobuf-c.h -) + google/protobuf-c/protobuf-c.h + ) mark_as_advanced(PROTOBUF_C_INCLUDE_DIR) # Find the protoc-c Executable find_program(PROTOBUF_PROTOC_C_EXECUTABLE - NAMES protoc-c - DOC "The Google Protocol Buffers C Compiler" -) + NAMES protoc-c + DOC "The Google Protocol Buffers C Compiler" + ) mark_as_advanced(PROTOBUF_PROTOC_C_EXECUTABLE) find_package(PackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ProtobufC DEFAULT_MSG - PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR PROTOBUF_PROTOC_C_EXECUTABLE) +find_package_handle_standard_args(ProtobufC DEFAULT_MSG + PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR PROTOBUF_PROTOC_C_EXECUTABLE) set(PROTOBUF_C_INCLUDE_DIRS ${PROTOBUF_C_INCLUDE_DIR}) diff --git a/cmake/GitVersionGen.cmake b/cmake/GitVersionGen.cmake index 53ac166d..718ec8a3 100644 --- a/cmake/GitVersionGen.cmake +++ b/cmake/GitVersionGen.cmake @@ -1,23 +1,23 @@ -macro(GIT_VERSION_GEN) +macro(git_version_gen) -include(FindGit) -if(NOT GIT_FOUND) - message(FATAL_ERROR "This is not a git repository") -endif() + include(FindGit) + if (NOT GIT_FOUND) + message(FATAL_ERROR "This is not a git repository") + endif () -find_program(SORT "sort") -mark_as_advanced(SORT) -if (${SORT} STREQUAL "") - message(FATAL_ERROR "Cannot find the sort executable") -endif() + find_program(SORT "sort") + mark_as_advanced(SORT) + if (${SORT} STREQUAL "") + message(FATAL_ERROR "Cannot find the sort executable") + endif () -find_program(TAIL "tail") -mark_as_advanced(TAIL) -if (${TAIL} STREQUAL "") - message(FATAL_ERROR "Cannot find the tail executable") -endif() + find_program(TAIL "tail") + mark_as_advanced(TAIL) + if (${TAIL} STREQUAL "") + message(FATAL_ERROR "Cannot find the tail executable") + endif () -execute_process( + execute_process( COMMAND ${GIT_EXECUTABLE} tag -l -n0 COMMAND ${SORT} -V COMMAND ${TAIL} -n 1 @@ -25,19 +25,19 @@ execute_process( OUTPUT_VARIABLE _git_tag RESULT_VARIABLE _git_result OUTPUT_STRIP_TRAILING_WHITESPACE) -if(NOT ${_git_result} EQUAL 0) - message(FATAL_ERROR "Cannot fetch repository tag") -endif() -message(STATUS "Repository tag is: ${_git_tag}") + if (NOT ${_git_result} EQUAL 0) + message(FATAL_ERROR "Cannot fetch repository tag") + endif () + message(STATUS "Repository tag is: ${_git_tag}") -string(REGEX REPLACE - "[^0-9]*([0-9]+)\\.[0-9]+.*" "\\1" - _version_major "${_git_tag}") -string(REGEX REPLACE - "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1" - _version_minor "${_git_tag}") + string(REGEX REPLACE + "[^0-9]*([0-9]+)\\.[0-9]+.*" "\\1" + _version_major "${_git_tag}") + string(REGEX REPLACE + "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1" + _version_minor "${_git_tag}") -set(PACKAGE_VERSION_MAJOR "${_version_major}") -set(PACKAGE_VERSION_MINOR "${_version_minor}") + set(PACKAGE_VERSION_MAJOR "${_version_major}") + set(PACKAGE_VERSION_MINOR "${_version_minor}") -endmacro(GIT_VERSION_GEN) +endmacro(git_version_gen) diff --git a/src/ipcpd/CMakeLists.txt b/src/ipcpd/CMakeLists.txt index 9c77683a..00baa762 100644 --- a/src/ipcpd/CMakeLists.txt +++ b/src/ipcpd/CMakeLists.txt @@ -1,14 +1,14 @@ set(IPCP_SOURCES - # Add source files here - ${CMAKE_CURRENT_SOURCE_DIR}/ipcp.c - ${CMAKE_CURRENT_SOURCE_DIR}/shim-data.c - ${CMAKE_CURRENT_SOURCE_DIR}/timerwheel.c -) + # Add source files here + ${CMAKE_CURRENT_SOURCE_DIR}/ipcp.c + ${CMAKE_CURRENT_SOURCE_DIR}/shim-data.c + ${CMAKE_CURRENT_SOURCE_DIR}/timerwheel.c + ) add_subdirectory(local) add_subdirectory(normal) add_subdirectory(shim-udp) -if(NOT APPLE) +if (NOT APPLE) add_subdirectory(shim-eth-llc) -endif() +endif () add_subdirectory(tests) diff --git a/src/ipcpd/local/CMakeLists.txt b/src/ipcpd/local/CMakeLists.txt index cc19aad0..824b4ca6 100644 --- a/src/ipcpd/local/CMakeLists.txt +++ b/src/ipcpd/local/CMakeLists.txt @@ -12,18 +12,18 @@ include_directories(${CURRENT_BINARY_PARENT_DIR}) include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) -SET(IPCP_LOCAL_TARGET ipcpd-local CACHE STRING "IPCP_LOCAL") +set(IPCP_LOCAL_TARGET ipcpd-local CACHE STRING "IPCP_LOCAL") set(SHIM_LOCAL_SOURCES # Add source files here ${CMAKE_CURRENT_SOURCE_DIR}/main.c) -add_executable (ipcpd-local ${SHIM_LOCAL_SOURCES} ${IPCP_SOURCES}) -target_link_libraries (ipcpd-local LINK_PUBLIC ouroboros) +add_executable(ipcpd-local ${SHIM_LOCAL_SOURCES} ${IPCP_SOURCES}) +target_link_libraries(ipcpd-local LINK_PUBLIC ouroboros) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(ipcpd-local -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(ipcpd-local -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ipcpd-local RUNTIME DESTINATION sbin) diff --git a/src/ipcpd/normal/CMakeLists.txt b/src/ipcpd/normal/CMakeLists.txt index 6319c3ef..af99b3f9 100644 --- a/src/ipcpd/normal/CMakeLists.txt +++ b/src/ipcpd/normal/CMakeLists.txt @@ -36,13 +36,13 @@ set(SOURCE_FILES pol/flat.c ) -add_executable (ipcpd-normal ${SOURCE_FILES} ${IPCP_SOURCES} +add_executable(ipcpd-normal ${SOURCE_FILES} ${IPCP_SOURCES} ${FLOW_ALLOC_SRCS}) -target_link_libraries (ipcpd-normal LINK_PUBLIC ouroboros) +target_link_libraries(ipcpd-normal LINK_PUBLIC ouroboros) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - macro_add_compile_flags(ipcpd-normal -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(ipcpd-normal -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ipcpd-normal RUNTIME DESTINATION sbin) diff --git a/src/ipcpd/shim-eth-llc/CMakeLists.txt b/src/ipcpd/shim-eth-llc/CMakeLists.txt index bd9add74..bd3049a2 100644 --- a/src/ipcpd/shim-eth-llc/CMakeLists.txt +++ b/src/ipcpd/shim-eth-llc/CMakeLists.txt @@ -15,21 +15,21 @@ include_directories(${CMAKE_BINARY_DIR}/include) protobuf_generate_c(SHIM_ETH_LLC_PROTO_SRCS SHIM_ETH_LLC_PROTO_HDRS shim_eth_llc_messages.proto) -SET(IPCP_SHIM_ETH_LLC_TARGET ipcpd-shim-eth-llc +set(IPCP_SHIM_ETH_LLC_TARGET ipcpd-shim-eth-llc CACHE STRING "IPCP_SHIM_ETH_LLC_TARGET") set(SHIM_ETH_LLC_SOURCES # Add source files here ${CMAKE_CURRENT_SOURCE_DIR}/main.c) -add_executable (ipcpd-shim-eth-llc ${SHIM_ETH_LLC_SOURCES} ${IPCP_SOURCES} - ${SHIM_ETH_LLC_PROTO_SRCS}) -target_link_libraries (ipcpd-shim-eth-llc LINK_PUBLIC ouroboros - ${PROTOBUF_C_LIBRARY}) +add_executable(ipcpd-shim-eth-llc ${SHIM_ETH_LLC_SOURCES} ${IPCP_SOURCES} + ${SHIM_ETH_LLC_PROTO_SRCS}) +target_link_libraries(ipcpd-shim-eth-llc LINK_PUBLIC ouroboros + ${PROTOBUF_C_LIBRARY}) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(ipcpd-shim-eth-llc -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(ipcpd-shim-eth-llc -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ipcpd-shim-eth-llc RUNTIME DESTINATION sbin) diff --git a/src/ipcpd/shim-udp/CMakeLists.txt b/src/ipcpd/shim-udp/CMakeLists.txt index cc60cfb7..2560f242 100644 --- a/src/ipcpd/shim-udp/CMakeLists.txt +++ b/src/ipcpd/shim-udp/CMakeLists.txt @@ -19,15 +19,15 @@ configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/shim_udp_config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/shim_udp_config.h") -SET(IPCP_SHIM_UDP_TARGET ipcpd-shim-udp CACHE STRING "IPCP_SHIM_UDP_TARGET") +set(IPCP_SHIM_UDP_TARGET ipcpd-shim-udp CACHE STRING "IPCP_SHIM_UDP_TARGET") set(SHIM_UDP_SOURCES # Add source files here ${CMAKE_CURRENT_SOURCE_DIR}/main.c) -add_executable (ipcpd-shim-udp ${SHIM_UDP_SOURCES} ${IPCP_SOURCES} +add_executable(ipcpd-shim-udp ${SHIM_UDP_SOURCES} ${IPCP_SOURCES} ${SHIM_UDP_PROTO_SRCS} "${CMAKE_CURRENT_BINARY_DIR}/shim_udp_config.h") -target_link_libraries (ipcpd-shim-udp LINK_PUBLIC ouroboros +target_link_libraries(ipcpd-shim-udp LINK_PUBLIC ouroboros ${PROTOBUF_C_LIBRARY}) # Find the nsupdate executable @@ -40,6 +40,7 @@ find_program(NSLOOKUP_EXECUTABLE NAMES nslookup DOC "The nslookup tool that resolves DNS names") +include(AddCompileFlags) if (${NSUPDATE_EXECUTABLE} STREQUAL "NSUPDATE_EXECUTABLE-NOTFOUND") message("-- Could not find nsupdate. Disabling DDNS functionality.") elseif (${NSLOOKUP_EXECUTABLE} STREQUAL "NSLOOKUP_EXECUTABLE-NOTFOUND") @@ -47,12 +48,11 @@ elseif (${NSLOOKUP_EXECUTABLE} STREQUAL "NSLOOKUP_EXECUTABLE-NOTFOUND") else () message("-- Found nsupdate: ${NSUPDATE_EXECUTABLE}") message("-- Found nslookup: ${NSLOOKUP_EXECUTABLE}") - MACRO_ADD_COMPILE_FLAGS(ipcpd-shim-udp -DCONFIG_OUROBOROS_ENABLE_DNS) -endif() + add_compile_flags(ipcpd-shim-udp -DCONFIG_OUROBOROS_ENABLE_DNS) +endif () -include(MacroAddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(ipcpd-shim-udp -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(ipcpd-shim-udp -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ipcpd-shim-udp RUNTIME DESTINATION sbin) diff --git a/src/ipcpd/tests/CMakeLists.txt b/src/ipcpd/tests/CMakeLists.txt index 57a910c8..07430127 100644 --- a/src/ipcpd/tests/CMakeLists.txt +++ b/src/ipcpd/tests/CMakeLists.txt @@ -13,9 +13,9 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) create_test_sourcelist(${src_folder}_tests test_suite.c - # Add new tests here - timerwheel_test.c -) + # Add new tests here + timerwheel_test.c + ) add_executable(${src_folder}_test EXCLUDE_FROM_ALL ${${src_folder}_tests}) target_link_libraries(${src_folder}_test ouroboros) @@ -25,7 +25,7 @@ add_dependencies(check ${src_folder}_test) set(tests_to_run ${${src_folder}_tests}) remove(tests_to_run test_suite.c) -foreach(test ${tests_to_run}) +foreach (test ${tests_to_run}) get_filename_component(test_name ${test} NAME_WE) add_test(${test_name} ${C_TEST_PATH}/${src_folder}_test ${test_name}) -endforeach(test) +endforeach (test) diff --git a/src/irmd/CMakeLists.txt b/src/irmd/CMakeLists.txt index 16b53414..930c7b05 100644 --- a/src/irmd/CMakeLists.txt +++ b/src/irmd/CMakeLists.txt @@ -5,23 +5,23 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) set(SOURCE_FILES - # Add source files here - api_table.c - apn_table.c - ipcp.c - irm_flow.c - main.c - registry.c - utils.c -) + # Add source files here + api_table.c + apn_table.c + ipcp.c + irm_flow.c + main.c + registry.c + utils.c + ) add_executable (irmd ${SOURCE_FILES}) target_link_libraries (irmd LINK_PUBLIC ouroboros) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(irmd -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(irmd -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS irmd RUNTIME DESTINATION sbin) diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 03452705..f6a30ef7 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -12,19 +12,19 @@ protobuf_generate_c(CDAP_PROTO_SRCS CDAP_PROTO_HDRS cdap.proto) protobuf_generate_c(RO_PROTO_SRCS RO_PROTO_HDRS ro.proto) protobuf_generate_c(CACEP_PROTO_SRCS CACEP_PROTO_HDRS cacep.proto) -if(NOT APPLE) +if (NOT APPLE) find_library(LIBRT_LIBRARIES rt) - if(NOT LIBRT_LIBRARIES) + if (NOT LIBRT_LIBRARIES) message(FATAL_ERROR "librt not found") - endif() -else() + endif () +else () set(LIBRT_LIBRARIES "") -endif() +endif () find_library(LIBPTHREAD_LIBRARIES pthread) -if(NOT LIBPTHREAD_LIBRARIES) +if (NOT LIBPTHREAD_LIBRARIES) message(FATAL_ERROR "libpthread not found") -endif() +endif () set(SOURCE_FILES # Add source files here @@ -58,9 +58,9 @@ add_library(ouroboros SHARED ${SOURCE_FILES} ${IRM_PROTO_SRCS} target_link_libraries(ouroboros ${LIBRT_LIBRARIES} ${LIBPTHREAD_LIBRARIES} ${PROTOBUF_C_LIBRARY}) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(ouroboros -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(ouroboros -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS ouroboros LIBRARY DESTINATION usr/lib) diff --git a/src/lib/tests/CMakeLists.txt b/src/lib/tests/CMakeLists.txt index e4ea3920..a9f38c6f 100644 --- a/src/lib/tests/CMakeLists.txt +++ b/src/lib/tests/CMakeLists.txt @@ -2,14 +2,14 @@ get_filename_component(PARENT_PATH ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY) get_filename_component(PARENT_DIR ${PARENT_PATH} NAME) create_test_sourcelist(${PARENT_DIR}_tests test_suite.c - # Add new tests here - bitmap_test.c - btree_test.c - crc32_test.c - hashtable_test.c - rib_test.c - sha3_test.c -) + # Add new tests here + bitmap_test.c + btree_test.c + crc32_test.c + hashtable_test.c + rib_test.c + sha3_test.c + ) add_executable(${PARENT_DIR}_test EXCLUDE_FROM_ALL ${${PARENT_DIR}_tests}) target_link_libraries(${PARENT_DIR}_test ouroboros) @@ -19,7 +19,7 @@ add_dependencies(check ${PARENT_DIR}_test) set(tests_to_run ${${PARENT_DIR}_tests}) remove(tests_to_run test_suite.c) -foreach(test ${tests_to_run}) +foreach (test ${tests_to_run}) get_filename_component(test_name ${test} NAME_WE) add_test(${test_name} ${C_TEST_PATH}/${PARENT_DIR}_test ${test_name}) -endforeach(test) +endforeach (test) diff --git a/src/nsmd/CMakeLists.txt b/src/nsmd/CMakeLists.txt index b916170b..2995b725 100644 --- a/src/nsmd/CMakeLists.txt +++ b/src/nsmd/CMakeLists.txt @@ -5,17 +5,17 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) set(SOURCE_FILES - # Add source files here - main.c -) + # Add source files here + main.c + ) -add_executable (nsmd ${SOURCE_FILES}) +add_executable(nsmd ${SOURCE_FILES}) -target_link_libraries (nsmd LINK_PUBLIC ouroboros) +target_link_libraries(nsmd LINK_PUBLIC ouroboros) -include(MacroAddCompileFlags) +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) - MACRO_ADD_COMPILE_FLAGS(nsmd -DCONFIG_OUROBOROS_DEBUG) + add_compile_flags(nsmd -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) install(TARGETS nsmd RUNTIME DESTINATION sbin) diff --git a/src/tools/cbr/CMakeLists.txt b/src/tools/cbr/CMakeLists.txt index 232bea36..1883141c 100644 --- a/src/tools/cbr/CMakeLists.txt +++ b/src/tools/cbr/CMakeLists.txt @@ -5,9 +5,9 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) set(SOURCE_FILES - # Add source files here - cbr.c -) + # Add source files here + cbr.c + ) add_executable(cbr ${SOURCE_FILES}) diff --git a/src/tools/echo/CMakeLists.txt b/src/tools/echo/CMakeLists.txt index 42bcdbfe..7cecfe50 100644 --- a/src/tools/echo/CMakeLists.txt +++ b/src/tools/echo/CMakeLists.txt @@ -5,9 +5,9 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) set(SOURCE_FILES - # Add source files here - echo.c -) + # Add source files here + echo.c + ) add_executable(echo-app ${SOURCE_FILES}) diff --git a/src/tools/irm/CMakeLists.txt b/src/tools/irm/CMakeLists.txt index f59d9af0..300ad982 100644 --- a/src/tools/irm/CMakeLists.txt +++ b/src/tools/irm/CMakeLists.txt @@ -5,28 +5,28 @@ include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_BINARY_DIR}/include) set(SOURCE_FILES - # Add source files here - irm.c - irm_bind_ap.c - irm_bind_api.c - irm_bind_ipcp.c - irm_ipcp_create.c - irm_ipcp_destroy.c - irm_ipcp_bootstrap.c - irm_ipcp_enroll.c - irm_unbind_ap.c - irm_unbind_api.c - irm_unbind_ipcp.c - irm_unbind.c - irm_bind.c - irm_ipcp.c - irm_register.c - irm_unregister.c - irm_utils.c -) + # Add source files here + irm.c + irm_bind_ap.c + irm_bind_api.c + irm_bind_ipcp.c + irm_ipcp_create.c + irm_ipcp_destroy.c + irm_ipcp_bootstrap.c + irm_ipcp_enroll.c + irm_unbind_ap.c + irm_unbind_api.c + irm_unbind_ipcp.c + irm_unbind.c + irm_bind.c + irm_ipcp.c + irm_register.c + irm_unregister.c + irm_utils.c + ) -add_executable (irm ${SOURCE_FILES}) +add_executable(irm ${SOURCE_FILES}) -target_link_libraries (irm LINK_PUBLIC ouroboros) +target_link_libraries(irm LINK_PUBLIC ouroboros) install(TARGETS irm RUNTIME DESTINATION sbin) diff --git a/src/tools/operf/CMakeLists.txt b/src/tools/operf/CMakeLists.txt index b63d24ee..906bab7b 100644 --- a/src/tools/operf/CMakeLists.txt +++ b/src/tools/operf/CMakeLists.txt @@ -10,9 +10,9 @@ if(NOT LIBM_LIBRARIES) endif() set(SOURCE_FILES - # Add source files here - operf.c -) + # Add source files here + operf.c + ) add_executable(operf ${SOURCE_FILES}) diff --git a/src/tools/oping/CMakeLists.txt b/src/tools/oping/CMakeLists.txt index a8fc7d86..f129a02b 100644 --- a/src/tools/oping/CMakeLists.txt +++ b/src/tools/oping/CMakeLists.txt @@ -10,9 +10,9 @@ if(NOT LIBM_LIBRARIES) endif() set(SOURCE_FILES - # Add source files here - oping.c -) + # Add source files here + oping.c + ) add_executable(oping ${SOURCE_FILES}) |