From 9db3c30218c417dc5bfb3b7fbba85643969f3c90 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 16 Mar 2016 22:36:24 +0000 Subject: QPID-7148: Update CMake files to use better more modern style and features - This is already the way we do this stuff in Qpid Proton - Upgrade minimum version of CMake to 2.8.7 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1735324 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/msvc.cmake | 287 +++++++++++++------------- qpid/cpp/src/tests/CMakeLists.txt | 65 ++---- qpid/cpp/src/tests/legacystore/CMakeLists.txt | 3 +- 3 files changed, 156 insertions(+), 199 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/msvc.cmake b/qpid/cpp/src/msvc.cmake index dc248f4f96..4aa2f71513 100644 --- a/qpid/cpp/src/msvc.cmake +++ b/qpid/cpp/src/msvc.cmake @@ -1,149 +1,138 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This file provides library support for MSVC builds. -# * Allows for detailed specification of file/product versions. -# * Installs PDB files. - -# -# If the compiler is Visual Studio set up installation of .pdb files -# -# Sample: install_pdb (qpidcommon ${QPID_COMPONENT_COMMON}) -# -MACRO (install_pdb theLibrary theComponent) - if (MSVC) - get_target_property(library_dll ${theLibrary} LOCATION) - string(REPLACE .dll .pdb library_pdb ${library_dll}) - string(REPLACE $(OutDir) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb}) - string(REPLACE $(Configuration) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb}) - string(REPLACE .pdb d.pdb libraryd_pdb ${library_pdb}) - #message(STATUS "_pdb: ${library_pdb}, ${libraryd_pdb}") - install (PROGRAMS - ${library_pdb} - DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB - COMPONENT ${theComponent} - OPTIONAL - CONFIGURATIONS Release|MinSizeRel) - install (PROGRAMS - ${library_pdb} - DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB - COMPONENT ${theComponent} - CONFIGURATIONS RelWithDebInfo) - install (PROGRAMS - ${libraryd_pdb} - DESTINATION ${QPID_INSTALL_LIBDIR}/DebugPDB - COMPONENT ${theComponent} - CONFIGURATIONS Debug) - endif (MSVC) -ENDMACRO (install_pdb) - -# -# inherit_value - if the symbol is undefined then set it to the given value. -# Set flag to indicate this symbol was defined here. -# -MACRO (inherit_value theSymbol theValue) - if (NOT DEFINED ${theSymbol}) - set (${theSymbol} ${theValue}) - # message ("Set symbol '${theSymbol}' to value '${theValue}'") - set (${theSymbol}_inherited = "true") - endif (NOT DEFINED ${theSymbol}) -ENDMACRO (inherit_value) - -# -# If compiler is Visual Studio then create a "version resource" for the project. -# Use this call to override CPACK and file global settings but not file per-project settings. -# Two groups of four version numbers specify "file" and "product" versions separately. -# -# Sample: add_msvc_version_full (qmfengine library dll 1 0 0 1 1 0 0 1) -# -MACRO (add_msvc_version_full verProject verProjectType verProjectFileExt verFN1 verFN2 verFN3 verFN4 verPN1 verPN2 verPN3 verPN4) - if (MSVC) - # Create project-specific version strings - inherit_value ("winver_${verProject}_FileVersionBinary" "${verFN1},${verFN2},${verFN3},${verFN4}") - inherit_value ("winver_${verProject}_ProductVersionBinary" "${verPN1},${verPN2},${verPN3},${verPN4}") - inherit_value ("winver_${verProject}_FileVersionString" "${verFN1}, ${verFN2}, ${verFN3}, ${verFN4}") - inherit_value ("winver_${verProject}_ProductVersionString" "${verPN1}, ${verPN2}, ${verPN3}, ${verPN4}") - inherit_value ("winver_${verProject}_FileDescription" "${winver_PACKAGE_NAME}-${verProject} ${verProjectType}") - inherit_value ("winver_${verProject}_LegalCopyright" "${winver_LEGAL_COPYRIGHT}") - inherit_value ("winver_${verProject}_InternalName" "${verProject}") - inherit_value ("winver_${verProject}_OriginalFilename" "${verProject}.${verProjectFileExt}") - inherit_value ("winver_${verProject}_ProductName" "${winver_DESCRIPTION_SUMMARY}") - - # Create strings to be substituted into the template file - set ("winverFileVersionBinary" "${winver_${verProject}_FileVersionBinary}") - set ("winverProductVersionBinary" "${winver_${verProject}_ProductVersionBinary}") - set ("winverFileVersionString" "${winver_${verProject}_FileVersionString}") - set ("winverProductVersionString" "${winver_${verProject}_ProductVersionString}") - set ("winverFileDescription" "${winver_${verProject}_FileDescription}") - set ("winverLegalCopyright" "${winver_${verProject}_LegalCopyright}") - set ("winverInternalName" "${winver_${verProject}_InternalName}") - set ("winverOriginalFilename" "${winver_${verProject}_OriginalFilename}") - set ("winverProductName" "${winver_${verProject}_ProductName}") - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/resources/template-resource.rc - ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc) - set (${verProject}_SOURCES - ${${verProject}_SOURCES} - ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc - ) - endif (MSVC) -ENDMACRO (add_msvc_version_full) - -# -# If compiler is Visual Studio then create a "version resource" for the project. -# Use this call to accept file override version settings or -# inherited CPACK_PACKAGE_VERSION version settings. -# -# Sample: add_msvc_version (qpidcommon library dll) -# -MACRO (add_msvc_version verProject verProjectType verProjectFileExt) - if (MSVC) - add_msvc_version_full (${verProject} - ${verProjectType} - ${verProjectFileExt} - ${winver_FILE_VERSION_N1} - ${winver_FILE_VERSION_N2} - ${winver_FILE_VERSION_N3} - ${winver_FILE_VERSION_N4} - ${winver_PRODUCT_VERSION_N1} - ${winver_PRODUCT_VERSION_N2} - ${winver_PRODUCT_VERSION_N3} - ${winver_PRODUCT_VERSION_N4}) - endif (MSVC) -ENDMACRO (add_msvc_version) - -# -# Install optional windows version settings. Override variables are specified in a file. -# -include (./CMakeWinVersions.cmake OPTIONAL) - -# -# Inherit global windows version settings from CPACK settings. -# -inherit_value ("winver_PACKAGE_NAME" "${CPACK_PACKAGE_NAME}") -inherit_value ("winver_DESCRIPTION_SUMMARY" "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") -inherit_value ("winver_FILE_VERSION_N1" "${CPACK_PACKAGE_VERSION_MAJOR}") -inherit_value ("winver_FILE_VERSION_N2" "${CPACK_PACKAGE_VERSION_MINOR}") -inherit_value ("winver_FILE_VERSION_N3" "${CPACK_PACKAGE_VERSION_PATCH}") -inherit_value ("winver_FILE_VERSION_N4" "1") -inherit_value ("winver_PRODUCT_VERSION_N1" "${winver_FILE_VERSION_N1}") -inherit_value ("winver_PRODUCT_VERSION_N2" "${winver_FILE_VERSION_N2}") -inherit_value ("winver_PRODUCT_VERSION_N3" "${winver_FILE_VERSION_N3}") -inherit_value ("winver_PRODUCT_VERSION_N4" "${winver_FILE_VERSION_N4}") -inherit_value ("winver_LEGAL_COPYRIGHT" "") +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# This file provides library support for MSVC builds. +# * Allows for detailed specification of file/product versions. +# * Installs PDB files. + +# +# If the compiler is Visual Studio set up installation of .pdb files +# +# Sample: install_pdb (qpidcommon ${QPID_COMPONENT_COMMON}) +# +MACRO (install_pdb theLibrary theComponent) + if (MSVC) + install (FILES + $ + DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB + COMPONENT ${theComponent} + OPTIONAL + CONFIGURATIONS Release MinSizeRel RelWithDebInfo) + install (FILES + $ + DESTINATION ${QPID_INSTALL_LIBDIR}/DebugPDB + COMPONENT ${theComponent} + CONFIGURATIONS Debug) + endif (MSVC) +ENDMACRO (install_pdb) + +# +# inherit_value - if the symbol is undefined then set it to the given value. +# Set flag to indicate this symbol was defined here. +# +MACRO (inherit_value theSymbol theValue) + if (NOT DEFINED ${theSymbol}) + set (${theSymbol} ${theValue}) + # message ("Set symbol '${theSymbol}' to value '${theValue}'") + set (${theSymbol}_inherited = "true") + endif (NOT DEFINED ${theSymbol}) +ENDMACRO (inherit_value) + +# +# If compiler is Visual Studio then create a "version resource" for the project. +# Use this call to override CPACK and file global settings but not file per-project settings. +# Two groups of four version numbers specify "file" and "product" versions separately. +# +# Sample: add_msvc_version_full (qmfengine library dll 1 0 0 1 1 0 0 1) +# +MACRO (add_msvc_version_full verProject verProjectType verProjectFileExt verFN1 verFN2 verFN3 verFN4 verPN1 verPN2 verPN3 verPN4) + if (MSVC) + # Create project-specific version strings + inherit_value ("winver_${verProject}_FileVersionBinary" "${verFN1},${verFN2},${verFN3},${verFN4}") + inherit_value ("winver_${verProject}_ProductVersionBinary" "${verPN1},${verPN2},${verPN3},${verPN4}") + inherit_value ("winver_${verProject}_FileVersionString" "${verFN1}, ${verFN2}, ${verFN3}, ${verFN4}") + inherit_value ("winver_${verProject}_ProductVersionString" "${verPN1}, ${verPN2}, ${verPN3}, ${verPN4}") + inherit_value ("winver_${verProject}_FileDescription" "${winver_PACKAGE_NAME}-${verProject} ${verProjectType}") + inherit_value ("winver_${verProject}_LegalCopyright" "${winver_LEGAL_COPYRIGHT}") + inherit_value ("winver_${verProject}_InternalName" "${verProject}") + inherit_value ("winver_${verProject}_OriginalFilename" "${verProject}.${verProjectFileExt}") + inherit_value ("winver_${verProject}_ProductName" "${winver_DESCRIPTION_SUMMARY}") + + # Create strings to be substituted into the template file + set ("winverFileVersionBinary" "${winver_${verProject}_FileVersionBinary}") + set ("winverProductVersionBinary" "${winver_${verProject}_ProductVersionBinary}") + set ("winverFileVersionString" "${winver_${verProject}_FileVersionString}") + set ("winverProductVersionString" "${winver_${verProject}_ProductVersionString}") + set ("winverFileDescription" "${winver_${verProject}_FileDescription}") + set ("winverLegalCopyright" "${winver_${verProject}_LegalCopyright}") + set ("winverInternalName" "${winver_${verProject}_InternalName}") + set ("winverOriginalFilename" "${winver_${verProject}_OriginalFilename}") + set ("winverProductName" "${winver_${verProject}_ProductName}") + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/resources/template-resource.rc + ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc) + set (${verProject}_SOURCES + ${${verProject}_SOURCES} + ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc + ) + endif (MSVC) +ENDMACRO (add_msvc_version_full) + +# +# If compiler is Visual Studio then create a "version resource" for the project. +# Use this call to accept file override version settings or +# inherited CPACK_PACKAGE_VERSION version settings. +# +# Sample: add_msvc_version (qpidcommon library dll) +# +MACRO (add_msvc_version verProject verProjectType verProjectFileExt) + if (MSVC) + add_msvc_version_full (${verProject} + ${verProjectType} + ${verProjectFileExt} + ${winver_FILE_VERSION_N1} + ${winver_FILE_VERSION_N2} + ${winver_FILE_VERSION_N3} + ${winver_FILE_VERSION_N4} + ${winver_PRODUCT_VERSION_N1} + ${winver_PRODUCT_VERSION_N2} + ${winver_PRODUCT_VERSION_N3} + ${winver_PRODUCT_VERSION_N4}) + endif (MSVC) +ENDMACRO (add_msvc_version) + +# +# Install optional windows version settings. Override variables are specified in a file. +# +include (./CMakeWinVersions.cmake OPTIONAL) + +# +# Inherit global windows version settings from CPACK settings. +# +inherit_value ("winver_PACKAGE_NAME" "${CPACK_PACKAGE_NAME}") +inherit_value ("winver_DESCRIPTION_SUMMARY" "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") +inherit_value ("winver_FILE_VERSION_N1" "${CPACK_PACKAGE_VERSION_MAJOR}") +inherit_value ("winver_FILE_VERSION_N2" "${CPACK_PACKAGE_VERSION_MINOR}") +inherit_value ("winver_FILE_VERSION_N3" "${CPACK_PACKAGE_VERSION_PATCH}") +inherit_value ("winver_FILE_VERSION_N4" "1") +inherit_value ("winver_PRODUCT_VERSION_N1" "${winver_FILE_VERSION_N1}") +inherit_value ("winver_PRODUCT_VERSION_N2" "${winver_FILE_VERSION_N2}") +inherit_value ("winver_PRODUCT_VERSION_N3" "${winver_FILE_VERSION_N3}") +inherit_value ("winver_PRODUCT_VERSION_N4" "${winver_FILE_VERSION_N4}") +inherit_value ("winver_LEGAL_COPYRIGHT" "") diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index 20f98204a4..d2e6c7dd13 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -37,11 +37,6 @@ if (MSVC) add_definitions( /wd4275 /wd4503 /D_CRT_SECURE_NO_WARNINGS) endif (MSVC) -# Macro to make it easier to remember where the tests are built -macro(remember_location testname) - set (${testname}_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${testname}${CMAKE_EXECUTABLE_SUFFIX}) -endmacro(remember_location) - # If we're using GCC allow variadic macros (even though they're c99 not c++01) if (CMAKE_COMPILER_IS_GNUCXX) add_definitions(-Wno-variadic-macros) @@ -62,11 +57,9 @@ endif (CMAKE_SYSTEM_NAME STREQUAL Windows) # Some generally useful utilities that just happen to be built in the test area add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (qpid-receive qpidmessaging qpidtypes qpidcommon) -remember_location(qpid-receive) add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (qpid-send qpidmessaging qpidtypes qpidcommon) -remember_location(qpid-send) install (TARGETS qpid-receive qpid-send @@ -74,45 +67,35 @@ install (TARGETS add_executable (qpid-perftest qpid-perftest.cpp ${platform_test_additions}) target_link_libraries (qpid-perftest qpidclient qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}) -remember_location(qpid-perftest) add_executable (qpid-latency-test qpid-latency-test.cpp ${platform_test_additions}) target_link_libraries (qpid-latency-test qpidclient qpidcommon) -remember_location(qpid-latency-test) add_executable (qpid-client-test qpid-client-test.cpp ${platform_test_additions}) target_link_libraries (qpid-client-test qpidclient qpidcommon) -remember_location(qpid-client-test) add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions}) target_link_libraries (qpid-ping qpidmessaging qpidtypes qpidcommon) -remember_location(qpid-ping) add_executable (qpid-topic-listener qpid-topic-listener.cpp ${platform_test_additions}) target_link_libraries (qpid-topic-listener qpidclient qpidcommon) -remember_location(qpid-topic-listener) add_executable (qpid-topic-publisher qpid-topic-publisher.cpp ${platform_test_additions}) target_link_libraries (qpid-topic-publisher qpidclient qpidcommon) -remember_location(qpid-topic-publisher) add_executable (receiver receiver.cpp ${platform_test_additions}) target_link_libraries (receiver qpidclient qpidcommon) -remember_location(receiver) # This is bizarre - using both messaging and client libraries add_executable (sender sender.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (sender qpidmessaging qpidtypes qpidclient qpidcommon) -remember_location(sender) add_executable (qpid-txtest qpid-txtest.cpp ${platform_test_additions}) target_link_libraries (qpid-txtest qpidclient qpidcommon qpidtypes) #qpid_txtest_SOURCES=qpid-txtest.cpp TestOptions.h ConnectionOptions.h -remember_location(qpid-txtest) add_executable (qpid-txtest2 qpid-txtest2.cpp ${platform_test_additions}) target_link_libraries (qpid-txtest2 qpidmessaging qpidtypes qpidcommon) -remember_location(qpid-txtest2) install (TARGETS qpid-perftest qpid-latency-test qpid-client-test @@ -240,9 +223,8 @@ target_link_libraries (unit_test ${qpid_test_boost_libs} qpidmessaging qpidtypes qpidbroker qpidclient qpidcommon) set_target_properties (unit_test PROPERTIES COMPILE_DEFINITIONS _IN_QPID_BROKER) -remember_location(unit_test) -add_test (unit_test ${test_wrap} -boostTest -- ${unit_test_LOCATION}) +add_test (NAME unit_test COMMAND ${test_wrap} -boostTest -- $) endif (BUILD_TESTING_UNITTESTS) @@ -263,55 +245,42 @@ endif (BUILD_SASL) # add_executable (echotest echotest.cpp ${platform_test_additions}) target_link_libraries (echotest qpidclient qpidcommon) -remember_location(echotest) add_executable (publish publish.cpp ${platform_test_additions}) target_link_libraries (publish qpidclient qpidcommon) -remember_location(publish) add_executable (consume consume.cpp ${platform_test_additions}) target_link_libraries (consume qpidclient qpidcommon) -remember_location(consume) add_executable (header_test header_test.cpp ${platform_test_additions}) target_link_libraries (header_test qpidclient qpidcommon) -remember_location(header_test) add_executable (declare_queues declare_queues.cpp ${platform_test_additions}) target_link_libraries (declare_queues qpidclient qpidcommon) -remember_location(declare_queues) add_executable (replaying_sender replaying_sender.cpp ${platform_test_additions}) target_link_libraries (replaying_sender qpidclient qpidcommon) -remember_location(replaying_sender) add_executable (resuming_receiver resuming_receiver.cpp ${platform_test_additions}) target_link_libraries (resuming_receiver qpidclient qpidcommon) -remember_location(resuming_receiver) add_executable (txshift txshift.cpp ${platform_test_additions}) target_link_libraries (txshift qpidclient qpidcommon) -remember_location(txshift) add_executable (txjob txjob.cpp ${platform_test_additions}) target_link_libraries (txjob qpidclient qpidcommon) -remember_location(txjob) add_executable (datagen datagen.cpp ${platform_test_additions}) target_link_libraries (datagen qpidclient qpidcommon) -remember_location(datagen) add_executable (msg_group_test msg_group_test.cpp ${platform_test_additions}) target_link_libraries (msg_group_test qpidmessaging qpidtypes qpidcommon) -remember_location(msg_group_test) add_executable (ha_test_max_queues ha_test_max_queues.cpp ${platform_test_additions}) target_link_libraries (ha_test_max_queues qpidclient qpidcommon) -remember_location(ha_test_max_queues) if (BUILD_SASL) add_executable (sasl_version sasl_version.cpp ${platform_test_additions}) - remember_location(sasl_version) endif (BUILD_SASL) set (python_src ${CMAKE_SOURCE_DIR}/../python) @@ -338,27 +307,27 @@ if (EXISTS ${python_src}) endif (EXISTS ${python_src}) if (BUILD_SASL) - add_test (sasl_fed ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix}) - add_test (sasl_fed_ex_dynamic ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} dynamic) - add_test (sasl_fed_ex_link ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} link) - add_test (sasl_fed_ex_queue ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} queue) - add_test (sasl_fed_ex_route ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} route) - add_test (sasl_no_dir ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_no_dir${test_script_suffix}) + add_test (NAME sasl_fed COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed${test_script_suffix}) + add_test (NAME sasl_fed_ex_dynamic COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} dynamic) + add_test (NAME sasl_fed_ex_link COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} link) + add_test (NAME sasl_fed_ex_queue COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} queue) + add_test (NAME sasl_fed_ex_route COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_fed_ex${test_script_suffix} route) + add_test (NAME sasl_no_dir COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/sasl_no_dir${test_script_suffix}) if (BUILD_SSL) - add_test(ssl_test ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/ssl_test${test_script_suffix}) + add_test(NAME ssl_test COMMAND ${test_wrap} -- ${CMAKE_CURRENT_SOURCE_DIR}/ssl_test${test_script_suffix}) endif (BUILD_SSL) endif (BUILD_SASL) -add_test (qpid-client-test ${test_wrap} -startBroker -- ${qpid-client-test_LOCATION}) -add_test (quick_perftest ${test_wrap} -startBroker -- ${qpid-perftest_LOCATION} --summary --count 100) -add_test (quick_topictest ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/quick_topictest${test_script_suffix}) -add_test (quick_txtest ${test_wrap} -startBroker -- ${qpid-txtest_LOCATION} --queues 4 --tx-count 10 --quiet) -add_test (quick_txtest2 ${test_wrap} -startBroker -- ${qpid-txtest2_LOCATION} --queues 4 --tx-count 10 --quiet) -add_test (msg_group_tests ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_msg_group_tests${test_script_suffix}) -add_test (run_header_test ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_header_test${test_script_suffix}) -add_test (python_tests ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/python_tests${test_script_suffix}) +add_test (NAME qpid-client-test COMMAND ${test_wrap} -startBroker -- $) +add_test (NAME quick_perftest COMMAND ${test_wrap} -startBroker -- $ --summary --count 100) +add_test (NAME quick_topictest COMMAND ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/quick_topictest${test_script_suffix}) +add_test (NAME quick_txtest COMMAND ${test_wrap} -startBroker -- $ --queues 4 --tx-count 10 --quiet) +add_test (NAME quick_txtest2 COMMAND ${test_wrap} -startBroker -- $ --queues 4 --tx-count 10 --quiet) +add_test (NAME msg_group_tests COMMAND ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_msg_group_tests${test_script_suffix}) +add_test (NAME run_header_test COMMAND ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_header_test${test_script_suffix}) +add_test (NAME python_tests COMMAND ${test_wrap} -startBroker -- ${CMAKE_CURRENT_SOURCE_DIR}/python_tests${test_script_suffix}) if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) # paged queue not yet implemented for windows - add_test (paged_queue_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_paged_queue_tests${test_script_suffix}) + add_test (NAME paged_queue_tests COMMAND ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_paged_queue_tests${test_script_suffix}) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) if (BUILD_AMQP) diff --git a/qpid/cpp/src/tests/legacystore/CMakeLists.txt b/qpid/cpp/src/tests/legacystore/CMakeLists.txt index 5527f23255..9f6f6b7171 100644 --- a/qpid/cpp/src/tests/legacystore/CMakeLists.txt +++ b/qpid/cpp/src/tests/legacystore/CMakeLists.txt @@ -53,8 +53,7 @@ target_link_libraries (${testname} if ("${ARGV1}" STREQUAL "LONG") set_target_properties(${testname} PROPERTIES COMPILE_DEFINITIONS LONG_TEST) endif () -remember_location(${testname}) -add_test (${testname} ${test_wrap} -boostTest -- ${${testname}_LOCATION}) +add_test (NAME ${testname} COMMAND ${test_wrap} -boostTest -- $) unset (testname) ENDMACRO (define_journal_test) -- cgit v1.2.1