Files
FairMQ/test/consumer/CMakeLists.txt
Claude d4644ae33a build!: require CMake 3.25
- Raise the minimum from 3.15 to 3.25 and the policy range to 3.31
- Remove the 3.22 version guards for ENVIRONMENT_MODIFICATION
- Link the GoogleTest target GTest::gtest, which FindGTest and the
  GoogleTest package config both provide

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 10:21:32 +01:00

34 lines
1.5 KiB
CMake

################################################################################
# Copyright (C) 2026 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" #
################################################################################
# Minimal downstream project. It checks that an installed FairMQ can be found
# and used the way the README describes. Run it via check-install.sh.
cmake_minimum_required(VERSION 3.15...3.31 FATAL_ERROR)
project(FairMQConsumer LANGUAGES CXX)
find_package(FairCMakeModules REQUIRED)
include(FairFindPackage2)
find_package2(PUBLIC FairMQ REQUIRED)
find_package2_implicit_dependencies()
# Variables documented in the README
foreach(var IN ITEMS FairMQ_VERSION FairMQ_PREFIX FairMQ_PACKAGE_DEPENDENCIES
FairMQ_PACKAGE_COMPONENTS)
if("${${var}}" STREQUAL "")
message(FATAL_ERROR "${var} is not set by find_package(FairMQ)")
endif()
endforeach()
if(NOT FairMQ_fairmq_FOUND STREQUAL "TRUE")
message(FATAL_ERROR "FairMQ_fairmq_FOUND is not set")
endif()
message(STATUS "FairMQ_PACKAGE_COMPONENTS: ${FairMQ_PACKAGE_COMPONENTS}")
add_executable(consumer main.cxx)
target_link_libraries(consumer PRIVATE FairMQ::FairMQ)