diff options
author | Bernhard Sessler <bernhard.sessler@corscience.de> | 2013-12-12 13:27:40 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-11 16:04:00 +0000 |
commit | 78b0923b6ae906753a843956a7b187df60dee595 (patch) | |
tree | 67cf284e46f1f107378704aac3f71eb65f1a5ac2 | |
parent | 9d8fffbf39ece34d1d4fb315beac1f8967a12bbe (diff) | |
download | cppunit-78b0923b6ae906753a843956a7b187df60dee595.tar.gz |
DllPluginTester: Add CMake build system
This patch will enable building the plugin tester executable
Change-Id: If14360b92dbc2d9698162b8fd0263421a061f90c
Signed-off-by: Bernhard Sessler <bernhard.sessler@corscience.de>
Reviewed-on: https://gerrit.libreoffice.org/7314
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/DllPlugInTester/CMakeLists.txt | 23 |
3 files changed, 29 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e6c407..b545035 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ option(BUILD_SHARED_LIBS "Build cppunit as shared or static library" option(CPPUNIT_BUILD_APIDOC "Adds a build target for generating the API documentation" OFF) option(CPPUNIT_BUILD_QT_TESTRUNNER "Build the Qt test runner library" OFF) option(CPPUNIT_BUILD_EXAMPLES "Build the examples shipped with cppunit" OFF) +option(CPPUNIT_BUILD_TESTING "Enables testing with CTest and adds a 'test' target" OFF) + +if(CPPUNIT_BUILD_TESTING) + enable_testing() +endif() if(BUILD_SHARED_LIBS AND WIN32) add_definitions(-DCPPUNIT_BUILD_DLL) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cc89dcb..fea7014 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(cppunit) +add_subdirectory(DllPlugInTester) if(CPPUNIT_BUILD_QT_TESTRUNNER) add_subdirectory(qttestrunner) diff --git a/src/DllPlugInTester/CMakeLists.txt b/src/DllPlugInTester/CMakeLists.txt new file mode 100644 index 0000000..d15e0a0 --- /dev/null +++ b/src/DllPlugInTester/CMakeLists.txt @@ -0,0 +1,23 @@ +# Create plugin tester executable +set(cppunit-plugintester_SOURCES + CommandLineParser.cpp + DllPlugInTester.cpp) + +add_executable(cppunit-plugintester ${cppunit-plugintester_SOURCES}) +target_link_libraries(cppunit-plugintester cppunit) + +install(TARGETS cppunit-plugintester + RUNTIME DESTINATION bin COMPONENT misc) + +if(CPPUNIT_BUILD_TESTING) + # Create plugin tester test executable + set(cppunit-plugintester-test_SOURCES + CommandLineParser.cpp + CommandLineParserTest.cpp + DllPlugInTesterTest.cpp) + + add_executable(cppunit-plugintester-test ${cppunit-plugintester-test_SOURCES}) + target_link_libraries(cppunit-plugintester-test cppunit) + + add_test(NAME cppunit-plugintester-test COMMAND cppunit-plugintester-test) +endif() |