Let CMake generate code for test application

This commit is contained in:
Martchus 2019-01-13 22:27:35 +01:00
parent 974c0b0396
commit 39dcba215e
5 changed files with 3 additions and 6 deletions

View File

@ -13,6 +13,7 @@ set(META_VERSION_MINOR 0)
set(META_VERSION_PATCH 7)
set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
set(META_CXX_STANDARD 17)
set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
# set project name for IDEs like Qt Creator
project(${META_PROJECT_NAME})
@ -46,7 +47,7 @@ else()
endif()
# find c++utilities
find_package(c++utilities 4.16.0 REQUIRED)
find_package(c++utilities 4.17.0 REQUIRED)
# use the source directory of c++utilities for includes rather than the location where headers are going to be installed
# note: this enables the tests to find the header files for c++utilities in case it is built within the same project

View File

@ -33,7 +33,6 @@ set(TEST_HEADER_FILES
tests/helper.h
)
set(TEST_SRC_FILES
tests/cppunit.cpp
tests/binarygenerator.cpp
)
@ -73,7 +72,7 @@ if(TARGET reflective_rapidjson_generator_tests)
INPUT_FILES
tests/structs.h # used by test cases
tests/morestructs.h # used by test cases
tests/cppunit.cpp # just for testing multiple input files and the "empty file" case
visitor.cpp # arbitrarily chosen source file (just for testing the "no relevant structs/classes" case)
GENERATORS
json
binary

View File

@ -1 +0,0 @@
#include <c++utilities/tests/cppunit.h>

View File

@ -13,7 +13,6 @@ set(SRC_FILES
set(TEST_HEADER_FILES
)
set(TEST_SRC_FILES
tests/cppunit.cpp
)
set(CMAKE_MODULE_FILES
cmake/modules/ReflectionGenerator.cmake

View File

@ -1 +0,0 @@
#include <c++utilities/tests/cppunit.h>