mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
- Remove the option BUILD_DOCS, the target docs and the install of the HTML files - Remove the Doxygen lookup and the docs line of the configure summary - Remove docs/footer.html and the Doxygen entries of README.md BREAKING CHANGE: The option BUILD_DOCS and the package component docs do not exist any more. The site in docs/ replaces the Doxygen HTML. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
119 lines
4.3 KiB
CMake
119 lines
4.3 KiB
CMake
################################################################################
|
|
# Copyright (C) 2018-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
|
# #
|
|
# This software is distributed under the terms of the #
|
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
|
# copied verbatim in the file "LICENSE" #
|
|
################################################################################
|
|
|
|
|
|
# Project ######################################################################
|
|
cmake_minimum_required(VERSION 3.15...3.30 FATAL_ERROR)
|
|
|
|
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
|
include(GitHelper)
|
|
get_git_version()
|
|
|
|
project(FairMQ VERSION ${PROJECT_VERSION} LANGUAGES CXX)
|
|
include(FairMQProjectSettings)
|
|
################################################################################
|
|
|
|
|
|
# Build options ################################################################
|
|
include(FairMQBuildOption)
|
|
|
|
fairmq_build_option(BUILD_FAIRMQ "Build FairMQ library and devices."
|
|
DEFAULT ON)
|
|
fairmq_build_option(BUILD_TESTING "Build tests."
|
|
DEFAULT OFF REQUIRES "BUILD_FAIRMQ")
|
|
fairmq_build_option(BUILD_EXAMPLES "Build FairMQ examples."
|
|
DEFAULT ON REQUIRES "BUILD_FAIRMQ")
|
|
fairmq_build_option(BUILD_TIDY_TOOL "Build the fairmq-tidy tool."
|
|
DEFAULT OFF)
|
|
fairmq_build_option(USE_EXTERNAL_GTEST "Do not use bundled GTest. Not recommended."
|
|
DEFAULT OFF)
|
|
fairmq_build_option(FAIRMQ_DEBUG_MODE "Compile in debug mode (may decrease performance)."
|
|
DEFAULT OFF)
|
|
################################################################################
|
|
|
|
|
|
# Dependencies #################################################################
|
|
include(CTest)
|
|
include(FairMQDependencies)
|
|
################################################################################
|
|
|
|
|
|
# Targets ######################################################################
|
|
if(FAIRMQ_TEST_LD_LIBRARY_PATH AND CMAKE_VERSION VERSION_LESS 3.22)
|
|
# The per-test injection relies on ctest's ENVIRONMENT_MODIFICATION, which
|
|
# older CMake silently drops -- the tests would run against the default
|
|
# runtime while looking green.
|
|
message(FATAL_ERROR "FAIRMQ_TEST_LD_LIBRARY_PATH requires CMake >= 3.22")
|
|
endif()
|
|
|
|
if(BUILD_FAIRMQ)
|
|
add_subdirectory(fairmq)
|
|
endif()
|
|
|
|
if(BUILD_TESTING)
|
|
add_subdirectory(test)
|
|
endif()
|
|
|
|
if(BUILD_EXAMPLES)
|
|
add_subdirectory(examples)
|
|
endif()
|
|
|
|
if(BUILD_TIDY_TOOL)
|
|
add_subdirectory(fairmq/tidy)
|
|
endif()
|
|
################################################################################
|
|
|
|
|
|
# Package components ###########################################################
|
|
if(BUILD_FAIRMQ)
|
|
list(APPEND PROJECT_PACKAGE_COMPONENTS fairmq)
|
|
endif()
|
|
if(BUILD_TESTING)
|
|
list(APPEND PROJECT_PACKAGE_COMPONENTS tests)
|
|
endif()
|
|
if(BUILD_EXAMPLES)
|
|
list(APPEND PROJECT_PACKAGE_COMPONENTS examples)
|
|
endif()
|
|
if(BUILD_TIDY_TOOL)
|
|
list(APPEND PROJECT_PACKAGE_COMPONENTS tidy_tool)
|
|
endif()
|
|
################################################################################
|
|
|
|
|
|
# Installation #################################################################
|
|
if(BUILD_FAIRMQ)
|
|
install(FILES cmake/FindZeroMQ.cmake
|
|
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
|
|
)
|
|
endif()
|
|
if(BUILD_TIDY_TOOL)
|
|
install(FILES cmake/FairMQTidy.cmake
|
|
DESTINATION ${PROJECT_INSTALL_CMAKEMODDIR}
|
|
)
|
|
endif()
|
|
|
|
include(FairMQPackage)
|
|
install_cmake_package()
|
|
################################################################################
|
|
|
|
|
|
# Summary ######################################################################
|
|
include(FairMQSummary)
|
|
|
|
message(STATUS "${BWhite}${PROJECT_NAME}${CR} ${PROJECT_GIT_VERSION} from ${PROJECT_DATE}")
|
|
fair_summary_global_cxx_flags_standard()
|
|
fair_summary_build_types()
|
|
fair_summary_package_dependencies()
|
|
fairmq_summary_components()
|
|
fairmq_summary_static_analysis()
|
|
fairmq_summary_install_prefix()
|
|
fairmq_summary_debug_mode()
|
|
fairmq_summary_compile_definitions()
|
|
message(STATUS " ")
|
|
################################################################################
|