mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d91a7d2361 | ||
|
c3f6d5c11f | ||
|
de7b5767fb | ||
|
7506243e1a | ||
|
03e6cea586 |
|
@ -7,13 +7,12 @@
|
|||
################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR)
|
||||
|
||||
cmake_policy(VERSION 3.9...3.15)
|
||||
|
||||
# Project ######################################################################
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
include(FairMQLib)
|
||||
|
||||
set_fairmq_cmake_policies()
|
||||
get_git_version()
|
||||
|
||||
project(FairMQ VERSION ${PROJECT_VERSION} LANGUAGES CXX)
|
||||
|
@ -49,8 +48,12 @@ find_package(Threads REQUIRED)
|
|||
|
||||
if(BUILD_FAIRMQ)
|
||||
find_package2(PUBLIC Boost VERSION 1.64 REQUIRED
|
||||
COMPONENTS container program_options thread system filesystem regex date_time signals
|
||||
COMPONENTS container program_options thread system filesystem regex date_time
|
||||
)
|
||||
# Normalize Boost version
|
||||
if(CMAKE_VERSION VERSION_LESS 3.15)
|
||||
set(Boost_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
|
||||
endif()
|
||||
find_package2(PUBLIC FairLogger VERSION 1.2.0 REQUIRED)
|
||||
find_package2(PRIVATE ZeroMQ VERSION 4.1.5 REQUIRED)
|
||||
endif()
|
||||
|
@ -212,7 +215,11 @@ if(PROJECT_PACKAGE_DEPENDENCIES)
|
|||
pad("${version_str}${version_req_str}" 25 " " version_padded COLOR 1)
|
||||
endif()
|
||||
if(${dep} STREQUAL FairLogger)
|
||||
if(FairLogger_PREFIX)
|
||||
set(prefix ${FairLogger_PREFIX})
|
||||
else()
|
||||
set(prefix ${FairLogger_ROOT})
|
||||
endif()
|
||||
elseif(${dep} STREQUAL GTest)
|
||||
get_filename_component(prefix ${GTEST_INCLUDE_DIRS}/.. ABSOLUTE)
|
||||
elseif(${dep} STREQUAL msgpack)
|
||||
|
|
|
@ -29,25 +29,6 @@ if(NOT WIN32 AND NOT DISABLE_COLOR)
|
|||
set(BWhite "${Esc}[1;37m")
|
||||
endif()
|
||||
|
||||
# set_fairmq_cmake_policies()
|
||||
#
|
||||
# Sets CMake policies.
|
||||
macro(set_fairmq_cmake_policies)
|
||||
# Find more details to each policy with cmake --help-policy CMPXXXX
|
||||
foreach(policy
|
||||
CMP0025 # Compiler id for Apple Clang is now AppleClang.
|
||||
CMP0028 # Double colon in target name means ALIAS or IMPORTED target.
|
||||
CMP0042 # MACOSX_RPATH is enabled by default.
|
||||
CMP0048 # The ``project()`` command manages VERSION variables.
|
||||
CMP0054 # Only interpret ``if()`` arguments as variables or keywords when unquoted.
|
||||
)
|
||||
if(POLICY ${policy})
|
||||
cmake_policy(SET ${policy} NEW)
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
|
||||
find_package(Git)
|
||||
# get_git_version([DEFAULT_VERSION version] [DEFAULT_DATE date] [OUTVAR_PREFIX prefix])
|
||||
#
|
||||
|
|
|
@ -11,6 +11,13 @@ find_path(DDS_INCLUDE_DIR
|
|||
HINTS ${DDS_ROOT} $ENV{DDS_ROOT}
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
if(NOT DDS_INCLUDE_DIR)
|
||||
find_path(DDS_INCLUDE_DIR
|
||||
NAMES dds_intercom.h
|
||||
HINTS ${DDS_ROOT} $ENV{DDS_ROOT}
|
||||
PATH_SUFFIXES include/DDS
|
||||
)
|
||||
endif()
|
||||
|
||||
find_path(DDS_LIBRARY_DIR
|
||||
NAMES libdds_intercom_lib.dylib libdds_intercom_lib.so
|
||||
|
|
|
@ -206,6 +206,9 @@ set_target_properties(${_target} PROPERTIES LABELS coverage)
|
|||
if(FAST_BUILD)
|
||||
set_target_properties(${_target} PROPERTIES OUTPUT_NAME FairMQ)
|
||||
endif()
|
||||
if(Boost_VERSION VERSION_LESS 1.66)
|
||||
target_compile_definitions(${_target} PUBLIC FAIR_MQ_HAS_NO_ASIO_IO_CONTEXT)
|
||||
endif()
|
||||
|
||||
#######################
|
||||
# include directories #
|
||||
|
@ -248,7 +251,6 @@ target_link_libraries(${_target}
|
|||
Boost::filesystem
|
||||
Boost::regex
|
||||
Boost::date_time
|
||||
Boost::signals
|
||||
FairLogger::FairLogger
|
||||
|
||||
PRIVATE # only libFairMQ links against private dependencies
|
||||
|
|
|
@ -18,8 +18,12 @@ namespace boost
|
|||
namespace asio
|
||||
{
|
||||
|
||||
#ifdef FAIR_MQ_HAS_NO_ASIO_IO_CONTEXT
|
||||
class io_service;
|
||||
#else
|
||||
class io_context;
|
||||
typedef class io_context io_service;
|
||||
#endif
|
||||
|
||||
} // namespace asio
|
||||
} // namespace boost
|
||||
|
|
Loading…
Reference in New Issue
Block a user