From 2370fe1ef54d9c70f79889b6c08913f7745960b0 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 13 Jan 2019 22:16:23 +0100 Subject: [PATCH] Let CMake generate code for test application --- CMakeLists.txt | 1 + cli/CMakeLists.txt | 3 +-- cli/tests/cppunit.cpp | 1 - connector/CMakeLists.txt | 3 +-- connector/tests/cppunit.cpp | 1 - libsyncthing/CMakeLists.txt | 3 +-- libsyncthing/tests/cppunit.cpp | 1 - testhelper/CMakeLists.txt | 1 + 8 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 cli/tests/cppunit.cpp delete mode 100644 connector/tests/cppunit.cpp delete mode 100644 libsyncthing/tests/cppunit.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index ed55dfe..0a399b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ set(META_VERSION_MAJOR 0) set(META_VERSION_MINOR 8) set(META_VERSION_PATCH 4) set(META_VERSION_EXACT_SONAME ON) +set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON) project(${META_PROJECT_NAME}) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 20c00eb..14592bf 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -21,12 +21,11 @@ set(SRC_FILES set(TEST_HEADER_FILES ) set(TEST_SRC_FILES - tests/cppunit.cpp tests/application.cpp ) # find c++utilities -find_package(c++utilities 4.14.0 REQUIRED) +find_package(c++utilities 4.17.0 REQUIRED) use_cpp_utilities() # find qtutilities diff --git a/cli/tests/cppunit.cpp b/cli/tests/cppunit.cpp deleted file mode 100644 index 67aaee6..0000000 --- a/cli/tests/cppunit.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/connector/CMakeLists.txt b/connector/CMakeLists.txt index 01bbb92..b0908dd 100644 --- a/connector/CMakeLists.txt +++ b/connector/CMakeLists.txt @@ -36,7 +36,6 @@ set(SRC_FILES set(TEST_HEADER_FILES ) set(TEST_SRC_FILES - tests/cppunit.cpp tests/connectiontests.cpp tests/misctests.cpp ) @@ -47,7 +46,7 @@ set(TS_FILES ) # find c++utilities -find_package(c++utilities 4.16.0 REQUIRED) +find_package(c++utilities 4.17.0 REQUIRED) use_cpp_utilities() set(META_PUBLIC_SHARED_LIB_DEPENDS c++utilities) set(META_PUBLIC_STATIC_LIB_DEPENDS c++utilities_static) diff --git a/connector/tests/cppunit.cpp b/connector/tests/cppunit.cpp deleted file mode 100644 index 67aaee6..0000000 --- a/connector/tests/cppunit.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libsyncthing/CMakeLists.txt b/libsyncthing/CMakeLists.txt index 9df7199..f468769 100644 --- a/libsyncthing/CMakeLists.txt +++ b/libsyncthing/CMakeLists.txt @@ -19,7 +19,6 @@ set(SRC_FILES set(TEST_HEADER_FILES ) set(TEST_SRC_FILES - tests/cppunit.cpp tests/interfacetests.cpp ) @@ -143,7 +142,7 @@ list(APPEND PRIVATE_SHARED_INCLUDE_DIRS "${SYNCTHING_PATH}/cmd/syncthing") list(APPEND PRIVATE_STATIC_INCLUDE_DIRS "${SYNCTHING_PATH}/cmd/syncthing") # find c++utilities -find_package(c++utilities 4.9.0 REQUIRED) +find_package(c++utilities 4.17.0 REQUIRED) list(APPEND CMAKE_MODULE_PATH ${CPP_UTILITIES_MODULE_DIRS}) list(APPEND PRIVATE_SHARED_INCLUDE_DIRS ${CPP_UTILITIES_INCLUDE_DIRS}) list(APPEND PRIVATE_STATIC_INCLUDE_DIRS ${CPP_UTILITIES_INCLUDE_DIRS}) diff --git a/libsyncthing/tests/cppunit.cpp b/libsyncthing/tests/cppunit.cpp deleted file mode 100644 index 67aaee6..0000000 --- a/libsyncthing/tests/cppunit.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/testhelper/CMakeLists.txt b/testhelper/CMakeLists.txt index f42ccc1..5eb0b86 100644 --- a/testhelper/CMakeLists.txt +++ b/testhelper/CMakeLists.txt @@ -9,6 +9,7 @@ set(META_PUBLIC_QT_MODULES Core) set(META_NO_INSTALL_TARGETS ON) set(META_NO_CPP_UNIT ON) set(META_TEST_TARGET_IS_MANUAL ON) +set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION OFF) # add project files set(HEADER_FILES