diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2013-10-28 12:39:56 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2013-10-28 12:39:56 +0000 |
| commit | 265821ba0b9ea2eb77ceb9158ceb83fffe12bc8f (patch) | |
| tree | 24657249764e27d73ab4cad068dc7daee8820bfe /qpid/cpp/src/tests/CMakeLists.txt | |
| parent | 45a6f4f415108dd26e00f8902db3f4d5d787b835 (diff) | |
| download | qpid-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/CMakeLists.txt')
| -rw-r--r-- | qpid/cpp/src/tests/CMakeLists.txt | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index 72ab6ae0d6..c5ea0a89e5 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -131,9 +131,15 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Windows) # Copy qpidd-p0 script to build directory so tests can find it. configure_file (${CMAKE_CURRENT_SOURCE_DIR}/qpidd-p0 ${CMAKE_CURRENT_BINARY_DIR} COPYONLY) -# Like this to work with cmake 2.4 on Unix -set (qpid_test_boost_libs - ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY}) +if (CMAKE_SYSTEM_NAME STREQUAL Windows) + set (ENV{OUTDIR} ${EXECUTABLE_OUTPUT_PATH}) + set (test_script_suffix ".ps1") + set (shell "powershell") +endif (CMAKE_SYSTEM_NAME STREQUAL Windows) + +set(test_wrap ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_test${test_script_suffix}) + +if (BUILD_TESTING_UNITTESTS) # # Unit test program @@ -142,6 +148,10 @@ set (qpid_test_boost_libs # when running the tests. If you want to build a subset of the tests run # ccmake and set unit_tests_to_build to the set you want to build. +# Like this to work with cmake 2.4 on Unix +set (qpid_test_boost_libs + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY}) + set(all_unit_tests AccumulatedAckTest Array @@ -217,6 +227,10 @@ target_link_libraries (unit_test set_target_properties (unit_test PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER) remember_location(unit_test) +add_test (unit_test ${test_wrap} ${unit_test_LOCATION}) + +endif (BUILD_TESTING_UNITTESTS) + add_library (shlibtest MODULE shlibtest.cpp) if (BUILD_SASL) @@ -296,15 +310,6 @@ if (PYTHON_EXECUTABLE) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../python) endif (PYTHON_EXECUTABLE) -if (CMAKE_SYSTEM_NAME STREQUAL Windows) - set (ENV{OUTDIR} ${EXECUTABLE_OUTPUT_PATH}) - set (test_script_suffix ".ps1") - set (shell "powershell") -endif (CMAKE_SYSTEM_NAME STREQUAL Windows) - -set(test_wrap ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_test${test_script_suffix}) - -add_test (unit_test ${test_wrap} ${unit_test_LOCATION}) if (BUILD_SASL) add_test (sasl_fed ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix}) add_test (sasl_fed_ex_dynamic ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex_dynamic${test_script_suffix}) |
