diff options
author | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-06-24 09:15:41 +0200 |
---|---|---|
committer | Enrico Loparco (eloparco) <eloparco@cisco.com> | 2021-06-24 09:15:41 +0200 |
commit | 229385955109b866a23c4ac2aa03d4d11044c39d (patch) | |
tree | 0591f9c2fc4144d62330337cc2b94c63dfeded54 /CMakeLists.txt | |
parent | 6ffbb5ed61733b8dbef39b1a9d437e899e9359d7 (diff) |
[HICN-708] Rebase with master
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com>
Change-Id: I2122e1d61dd3b2e039972624ffbdbcb3c5610159
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 194084de8..61d0fb295 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,10 +19,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules") set_property(GLOBAL PROPERTY USE_FOLDERS ON) -# Enable gtests (`make test`) -# `make test ARGS="-V"` can be used for verbose output -enable_testing() - ## Enabled components option(BUILD_LIBHICN "Build the hicn core library" ON) option(BUILD_HICNLIGHT "Build the hicn light forwarder" ON) @@ -40,6 +36,7 @@ option(BUILD_HICNPLUGIN "Build the hicn vpp plugin" OFF) option(BUILD_SYSREPOPLUGIN "Build the sysrepo plugin" OFF) option(BUILD_EXTRAS "Build external projects" OFF) option(BUILD_TELEMETRY "Build telemetry projects" OFF) +option(BUILD_TESTS "Build unit tests" OFF) option(DISABLE_EXECUTABLES "Disable executables" OFF) if ((BUILD_APPS OR BUILD_UTILS) AND NOT BUILD_LIBTRANSPORT) @@ -84,6 +81,7 @@ set(BUILD_UTILS_DIR utils) set(BUILD_APPS_DIR apps) set(BUILD_CTRL_DIR ctrl) set(BUILD_HICNPLUGIN_DIR hicn-plugin) +set(BUILD_SYSREPOPLUGIN_DIR ctrl/sysrepo-plugins) set(BUILD_EXTRAS_DIR extras/) set(BUILD_TELEMETRY_DIR telemetry) @@ -100,11 +98,25 @@ if (NOT WIN32) add_compile_options(-Wall -Werror -Wno-shorten-64-to-32) endif () +# Add unit tests +if (BUILD_TESTS) + message(STATUS "Tests enabled.") + include (GTestImport) + + if(${CMAKE_VERSION} VERSION_GREATER "3.10.0") + include (GoogleTest) + else() + include (CTest) + endif() +endif() + message(STATUS "Building the following subprojects: ${subdirs}") foreach(dir ${subdirs}) add_subdirectory(${dir}) endforeach() +add_subdirectory(docs/doxygen) + include(Packager) -make_packages() +make_packages()
\ No newline at end of file |