diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-12-08 15:45:46 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:13 -0300 |
commit | 7611d0a4d22dd60a9236623c810e25f7e12ad377 (patch) | |
tree | 1a6b8ec4cc73be3637c06304802ba2223f5d4186 | |
parent | b56272a3b61835045d061afed4326ff657e4230c (diff) |
Add option to install the tests binaries.
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6643579bd..51ca3fb90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ find_package(LibXslt 1.1.19) option(DISABLE_DOCSTRINGS "Disable documentation extraction." FALSE) option(BUILD_TESTS "Build tests." TRUE) +option(INSTALL_TESTS "Install tests" FALSE) option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) if (NOT DISABLE_DOCSTRINGS) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 959d4f48b..575865e19 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,6 +5,9 @@ macro(declare_test testname) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${apiextractor_SOURCE_DIR}) target_link_libraries(${testname} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} apiextractor) add_test(${testname} ${testname}) + if (INSTALL_TESTS) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${testname} DESTINATION share/apiextractor${apiextractor_SUFFIX}/tests) + endif() endmacro(declare_test testname) declare_test(testabstractmetaclass) |