summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/legacystore
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-10-28 12:39:56 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-10-28 12:39:56 +0000
commit265821ba0b9ea2eb77ceb9158ceb83fffe12bc8f (patch)
tree24657249764e27d73ab4cad068dc7daee8820bfe /qpid/cpp/src/tests/legacystore
parent45a6f4f415108dd26e00f8902db3f4d5d787b835 (diff)
downloadqpid-python-265821ba0b9ea2eb77ceb9158ceb83fffe12bc8f.tar.gz
QPID-5260: Significant tidy up of cmake build
* Move to cmake 2.6 as minimum required version (2.4 is extremely long in the tooth now) * Add control over building individual language bindings * Make settings you don't usually want to change advanced so they are hidden by default * Changed to a uniform naming scheme for options: ** Options controlling what to build are all BUILD_ ** Options controlling features of he build are ENABLE_ ** Options controlling internal aspects of the qpid runtime are QPID_ * Respect the BUILD_TESTING option so that we won't build the tests unless it is set (it is by default) * If we don't find the boost_unit_test_framework then don't fail, just don't build the unit tests (this is motivated by one of the Apache Jenkins ubuntu builders which has this set up) * Tidied up some of the detection of external dependencies to make it more idiomatic cmake (but there is more to do here) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536329 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/legacystore')
-rw-r--r--qpid/cpp/src/tests/legacystore/CMakeLists.txt47
1 files changed, 24 insertions, 23 deletions
diff --git a/qpid/cpp/src/tests/legacystore/CMakeLists.txt b/qpid/cpp/src/tests/legacystore/CMakeLists.txt
index ab0eb55922..3b4f50327d 100644
--- a/qpid/cpp/src/tests/legacystore/CMakeLists.txt
+++ b/qpid/cpp/src/tests/legacystore/CMakeLists.txt
@@ -21,16 +21,15 @@ if(BUILD_LEGACYSTORE AND BUILD_TESTING)
message(STATUS "Building legacystore tests")
-# Make sure that everything get built before the tests
-# Need to create a var with all the necessary top level targets
-
-# If we're linking Boost for DLLs, turn that on for the unit test too.
+# If we're linking Boost for DLLs, turn that on for the tests too.
if (QPID_LINK_BOOST_DYNAMIC)
add_definitions(-DBOOST_TEST_DYN_LINK)
endif (QPID_LINK_BOOST_DYNAMIC)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
+if (BUILD_TESTING_UNITTESTS)
+
# Like this to work with cmake 2.4 on Unix
set (qpid_test_boost_libs
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY})
@@ -99,25 +98,6 @@ define_journal_test (_ut_lpmgr LONG)
define_journal_test (_st_basic LONG)
define_journal_test (_st_read LONG)
-add_executable(jtt
- jrnl/jtt/args.cpp
- jrnl/jtt/data_src.cpp
- jrnl/jtt/jrnl_init_params.cpp
- jrnl/jtt/jrnl_instance.cpp
- jrnl/jtt/main.cpp
- jrnl/jtt/read_arg.cpp
- jrnl/jtt/test_case.cpp
- jrnl/jtt/test_case_result.cpp
- jrnl/jtt/test_case_result_agregation.cpp
- jrnl/jtt/test_case_set.cpp
- jrnl/jtt/test_mgr.cpp)
-
-target_link_libraries (jtt
- ${Boost_PROGRAM_OPTIONS_LIBRARY}
- ${clock_gettime_LIB} legacystore_shared)
-
-add_test(journal_jtt ${CMAKE_CURRENT_BINARY_DIR}/jtt -c ${CMAKE_CURRENT_SOURCE_DIR}/jrnl/jtt/jtt.csv)
-
add_executable (jtt__ut
jrnl/jtt/_ut_data_src.cpp
jrnl/jtt/_ut_jrnl_init_params.cpp
@@ -145,10 +125,31 @@ target_link_libraries (jtt__ut
add_test(NAME journal_jtt_ut WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/jrnl/jtt COMMAND ${CMAKE_CURRENT_BINARY_DIR}/jtt__ut)
+endif (BUILD_TESTING_UNITTESTS)
+
#
# Other test programs
#
+add_executable(jtt
+ jrnl/jtt/args.cpp
+ jrnl/jtt/data_src.cpp
+ jrnl/jtt/jrnl_init_params.cpp
+ jrnl/jtt/jrnl_instance.cpp
+ jrnl/jtt/main.cpp
+ jrnl/jtt/read_arg.cpp
+ jrnl/jtt/test_case.cpp
+ jrnl/jtt/test_case_result.cpp
+ jrnl/jtt/test_case_result_agregation.cpp
+ jrnl/jtt/test_case_set.cpp
+ jrnl/jtt/test_mgr.cpp)
+
+target_link_libraries (jtt
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${clock_gettime_LIB} legacystore_shared)
+
+add_test(journal_jtt ${CMAKE_CURRENT_BINARY_DIR}/jtt -c ${CMAKE_CURRENT_SOURCE_DIR}/jrnl/jtt/jtt.csv)
+
add_test (legacystore_python_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_python_tests${test_script_suffix})
endif (BUILD_LEGACYSTORE AND BUILD_TESTING)