summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/CMakeLists.txt18
-rw-r--r--src/lib/tests/CMakeLists.txt20
2 files changed, 19 insertions, 19 deletions
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)