From 1776700d9317a626db8dfa33490349c6990e02c7 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 8 Oct 2024 15:04:08 +0200 Subject: [PATCH] Add downstream tests to make sure version is usable --- test/downstream-project-cmake-test/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/downstream-project-cmake-test/CMakeLists.txt b/test/downstream-project-cmake-test/CMakeLists.txt index f316e8ef..6eda9cc2 100644 --- a/test/downstream-project-cmake-test/CMakeLists.txt +++ b/test/downstream-project-cmake-test/CMakeLists.txt @@ -23,5 +23,13 @@ project(DownstreamProjectUsingk4FWCore) find_package(k4FWCore) +if (NOT DEFINED ${k4FWCore_VERSION}) + message(FATAL_ERROR "CAnnot find k4FWCore version information") +endif() + +if (NOT ${k4FWCore_VERSION} MATCHES "^[0-9]+\\.[0-9+](\\.[0-9]+)?$") + message(FATEL_ERROR "Exported k4FWCore version cannot be used as a version: " ${k4FWCore_VERSION}) +endif() + add_executable(appUsingk4FWCore main.cxx) target_link_libraries(appUsingk4FWCore k4FWCore::k4FWCore)