diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index afbd45f21..61d0fb295 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,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) @@ -62,9 +63,9 @@ endif() list(APPEND dir_options BUILD_LIBHICN + BUILD_CTRL BUILD_HICNLIGHT BUILD_HICNPLUGIN - BUILD_CTRL BUILD_LIBTRANSPORT BUILD_UTILS BUILD_APPS @@ -97,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()
\ No newline at end of file |