Let CMake generate code for test application
This commit is contained in:
parent
974c0b0396
commit
39dcba215e
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include <c++utilities/tests/cppunit.h>
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#include <c++utilities/tests/cppunit.h>
|
Loading…
Reference in New Issue