mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Move test directory one up
This commit is contained in:
parent
33fffb1644
commit
2327fd2115
|
@ -20,6 +20,8 @@ project(FairMQ VERSION ${FairMQ_VERSION} LANGUAGES CXX)
|
|||
message("${BWhite}${PROJECT_NAME}${CR} ${FairMQ_GIT_VERSION} from ${FairMQ_DATE}")
|
||||
|
||||
set_fairmq_defaults()
|
||||
|
||||
include(CTest)
|
||||
################################################################################
|
||||
|
||||
|
||||
|
@ -37,6 +39,10 @@ find_package(Boost 1.64 ${SILENCE_BOOST} REQUIRED COMPONENTS system)
|
|||
if(BUILD_OFI_TRANSPORT)
|
||||
find_package(OFI 1.6.0 REQUIRED COMPONENTS fi_sockets)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
find_package(GTest REQUIRED)
|
||||
endif()
|
||||
################################################################################
|
||||
|
||||
|
||||
|
@ -48,6 +54,10 @@ configure_file(${PROJECT_NAME_LOWER}/Version.h.in
|
|||
)
|
||||
|
||||
add_subdirectory(fairmq)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
################################################################################
|
||||
|
||||
|
||||
|
@ -60,6 +70,12 @@ install_fairmq_cmake_package()
|
|||
message(" ")
|
||||
message(" ${Cyan}COMPONENT BUILT? INFO${CR}")
|
||||
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)
|
||||
set(ofi_summary "${BGreen}YES${CR} (disable with ${BMagenta}-DBUILD_OFI_TRANSPORT=OFF${CR})")
|
||||
else()
|
||||
|
|
|
@ -5,29 +5,6 @@
|
|||
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||
# 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 #
|
||||
|
@ -54,9 +31,6 @@ endif()
|
|||
##################
|
||||
# subdirectories #
|
||||
##################
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
add_subdirectory(shmem/prototype)
|
||||
|
||||
##########################
|
||||
|
@ -253,7 +227,6 @@ endif()
|
|||
#######################
|
||||
target_include_directories(FairMQ
|
||||
PUBLIC # consumers inherit public include directories
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/logger>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
|
@ -323,11 +296,11 @@ target_link_libraries(shmmonitor FairMQ)
|
|||
add_executable(uuidGen run/runUuidGenerator.cxx)
|
||||
target_link_libraries(uuidGen FairMQ)
|
||||
|
||||
####################
|
||||
# aggregate target #
|
||||
####################
|
||||
# all targets except tests
|
||||
set(FAIRMQ_FULL_TARGETS
|
||||
###########
|
||||
# install #
|
||||
###########
|
||||
install(
|
||||
TARGETS # FairMQFull, tests are not installed
|
||||
FairMQ
|
||||
bsampler
|
||||
merger
|
||||
|
@ -336,33 +309,6 @@ set(FAIRMQ_FULL_TARGETS
|
|||
sink
|
||||
splitter
|
||||
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
|
||||
|
||||
|
@ -384,20 +330,3 @@ foreach(HEADER ${FAIRMQ_HEADER_FILES})
|
|||
COMPONENT fairmq
|
||||
)
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# copied verbatim in the file "LICENSE" #
|
||||
################################################################################
|
||||
|
||||
find_package(GTest REQUIRED)
|
||||
include(GTestHelper)
|
||||
|
||||
#############################
|
||||
|
@ -170,11 +169,3 @@ add_testsuite(FairMQ.StateMachine
|
|||
LINKS FairMQ
|
||||
TIMEOUT 10
|
||||
)
|
||||
|
||||
##############################
|
||||
# Aggregate all test targets #
|
||||
##############################
|
||||
add_custom_target(FairMQTests
|
||||
DEPENDS
|
||||
${ALL_TEST_TARGETS}
|
||||
)
|
Loading…
Reference in New Issue
Block a user