Move test directory one up

This commit is contained in:
Dennis Klein 2018-04-12 17:46:18 +02:00
parent 33fffb1644
commit 2327fd2115
No known key found for this signature in database
GPG Key ID: 08E62D23FA0ECBBC
51 changed files with 21 additions and 85 deletions

View File

@ -20,6 +20,8 @@ project(FairMQ VERSION ${FairMQ_VERSION} LANGUAGES CXX)
message("${BWhite}${PROJECT_NAME}${CR} ${FairMQ_GIT_VERSION} from ${FairMQ_DATE}") message("${BWhite}${PROJECT_NAME}${CR} ${FairMQ_GIT_VERSION} from ${FairMQ_DATE}")
set_fairmq_defaults() set_fairmq_defaults()
include(CTest)
################################################################################ ################################################################################
@ -37,6 +39,10 @@ find_package(Boost 1.64 ${SILENCE_BOOST} REQUIRED COMPONENTS system)
if(BUILD_OFI_TRANSPORT) if(BUILD_OFI_TRANSPORT)
find_package(OFI 1.6.0 REQUIRED COMPONENTS fi_sockets) find_package(OFI 1.6.0 REQUIRED COMPONENTS fi_sockets)
endif() endif()
if(BUILD_TESTING)
find_package(GTest REQUIRED)
endif()
################################################################################ ################################################################################
@ -48,6 +54,10 @@ configure_file(${PROJECT_NAME_LOWER}/Version.h.in
) )
add_subdirectory(fairmq) add_subdirectory(fairmq)
if(BUILD_TESTING)
add_subdirectory(test)
endif()
################################################################################ ################################################################################
@ -60,6 +70,12 @@ install_fairmq_cmake_package()
message(" ") message(" ")
message(" ${Cyan}COMPONENT BUILT? INFO${CR}") message(" ${Cyan}COMPONENT BUILT? INFO${CR}")
message(" ${BWhite}library${CR} ${BGreen}YES${CR} (default, always built)") message(" ${BWhite}library${CR} ${BGreen}YES${CR} (default, always built)")
if(BUILD_OFI_TRANSPORT)
set(tests_summary "${BGreen}YES${CR} (default, disable with ${BMagenta}-DBUILD_TESTING=OFF${CR})")
else()
set(tests_summary "${BRed} NO${CR} (enable with ${BMagenta}-DBUILD_TESTING=ON${CR})")
endif()
message(" ${BWhite}tests${CR} ${tests_summary}")
if(BUILD_OFI_TRANSPORT) if(BUILD_OFI_TRANSPORT)
set(ofi_summary "${BGreen}YES${CR} (disable with ${BMagenta}-DBUILD_OFI_TRANSPORT=OFF${CR})") set(ofi_summary "${BGreen}YES${CR} (disable with ${BMagenta}-DBUILD_OFI_TRANSPORT=OFF${CR})")
else() else()

View File

@ -5,29 +5,6 @@
# GNU Lesser General Public Licence (LGPL) version 3, # # GNU Lesser General Public Licence (LGPL) version 3, #
# copied verbatim in the file "LICENSE" # # copied verbatim in the file "LICENSE" #
################################################################################ ################################################################################
#
# This is the top-level cmake file for the FairMQ submodule.
#
# Testing:
# Enable the building of tests by enabling the cmake option BUILD_TESTING.
#
# Linking:
# Depend on FairMQ target, if you want to link against libFairMQ.
#
# Convenience targets defined:
# * FairMQFull - build everything in the submodule except tests
# * FairMQAll - build everything including tests, if enabled
# * FairMQInstall - install everything from the FairMQ submodule
# * FairMQTests - build all tests in the submodule
#
# Installation:
# * Header files are installed hierarchically
# into ${CMAKE_INSTALL_PREFIX}/include/fairmq
# * All targets in FairMQFull are exported to
# ${CMAKE_INSTALL_PREFIX}/include/cmake/FairMQ.cmake
# with namespace prefix "FairRoot::"
#
#
#################### ####################
# external plugins # # external plugins #
@ -54,9 +31,6 @@ endif()
################## ##################
# subdirectories # # subdirectories #
################## ##################
if(BUILD_TESTING)
add_subdirectory(test)
endif()
add_subdirectory(shmem/prototype) add_subdirectory(shmem/prototype)
########################## ##########################
@ -253,7 +227,6 @@ endif()
####################### #######################
target_include_directories(FairMQ target_include_directories(FairMQ
PUBLIC # consumers inherit public include directories PUBLIC # consumers inherit public include directories
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/logger>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}> $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
@ -323,11 +296,11 @@ target_link_libraries(shmmonitor FairMQ)
add_executable(uuidGen run/runUuidGenerator.cxx) add_executable(uuidGen run/runUuidGenerator.cxx)
target_link_libraries(uuidGen FairMQ) target_link_libraries(uuidGen FairMQ)
#################### ###########
# aggregate target # # install #
#################### ###########
# all targets except tests install(
set(FAIRMQ_FULL_TARGETS TARGETS # FairMQFull, tests are not installed
FairMQ FairMQ
bsampler bsampler
merger merger
@ -336,33 +309,6 @@ set(FAIRMQ_FULL_TARGETS
sink sink
splitter splitter
shmmonitor shmmonitor
)
add_custom_target(FairMQFull DEPENDS ${FAIRMQ_FULL_TARGETS})
# all targets including tests, if enabled
if(BUILD_TESTING)
set(FAIRMQ_TEST_TARGET FairMQTests)
endif()
add_custom_target(FairMQAll
DEPENDS
FairMQFull
${FAIRMQ_TEST_TARGET}
)
###########################
# generate cotire targets #
###########################
#cotire(${FAIRMQ_FULL_TARGETS})
# disabled by default for now, because it messes up target properties
# still useful for development
###########
# install #
###########
install(
TARGETS # FairMQFull, tests are not installed
${FAIRMQ_FULL_TARGETS}
EXPORT FairMQ EXPORT FairMQ
@ -384,20 +330,3 @@ foreach(HEADER ${FAIRMQ_HEADER_FILES})
COMPONENT fairmq COMPONENT fairmq
) )
endforeach() endforeach()
# export FairMQ targets
install(
EXPORT FairMQ
DESTINATION include/cmake
NAMESPACE FairRoot::
EXPORT_LINK_INTERFACE_LIBRARIES
COMPONENT fairmq
)
# use the following target to only install the fairmq component
add_custom_target(FairMQInstall
DEPENDS FairMQFull
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_COMPONENT=fairmq -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
)

View File

@ -6,7 +6,6 @@
# copied verbatim in the file "LICENSE" # # copied verbatim in the file "LICENSE" #
################################################################################ ################################################################################
find_package(GTest REQUIRED)
include(GTestHelper) include(GTestHelper)
############################# #############################
@ -170,11 +169,3 @@ add_testsuite(FairMQ.StateMachine
LINKS FairMQ LINKS FairMQ
TIMEOUT 10 TIMEOUT 10
) )
##############################
# Aggregate all test targets #
##############################
add_custom_target(FairMQTests
DEPENDS
${ALL_TEST_TARGETS}
)