aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/base/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/hicn/base/test/CMakeLists.txt')
-rw-r--r--hicn-light/src/hicn/base/test/CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/hicn-light/src/hicn/base/test/CMakeLists.txt b/hicn-light/src/hicn/base/test/CMakeLists.txt
new file mode 100644
index 0000000..03c5a89
--- /dev/null
+++ b/hicn-light/src/hicn/base/test/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Copyright (c) 2017-2019 Cisco and/or its affiliates.
+
+include(BuildMacros)
+
+list(APPEND TESTS
+ test-loop
+)
+
+foreach(test ${TESTS})
+ build_executable(${test}
+ NO_INSTALL
+ SOURCES ${test}.cc
+ LINK_LIBRARIES ${LIBHICN_LIGHT_SHARED} ${GTEST_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
+ INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS} ${GTEST_INCLUDE_DIRS}
+ DEPENDS gtest ${LIBHICN_LIGHT_SHARED}
+ COMPONENT ${HICN_LIGHT}
+ DEFINITIONS "${COMPILER_DEFINITIONS}"
+ )
+
+ if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
+ gtest_discover_tests(${test}-bin TEST_PREFIX new:)
+ else()
+ add_test(NAME ${test}-bin COMMAND ${test})
+ endif()
+endforeach()