From c3dbe76d2eeef44f4b1ebb98078a7d1a81384eda Mon Sep 17 00:00:00 2001 From: Chris Green Date: Fri, 1 Dec 2023 12:53:39 -0600 Subject: [PATCH] Detect failure to calculate relative install path --- Modules/CetInstalledPath.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Modules/CetInstalledPath.cmake b/Modules/CetInstalledPath.cmake index af4eaeca..73e76458 100644 --- a/Modules/CetInstalledPath.cmake +++ b/Modules/CetInstalledPath.cmake @@ -78,8 +78,9 @@ function(cet_installed_path OUT_VAR) cet_regex_escape("${CIP_RELATIVE}" VAR e_relvar) endif() string(REGEX REPLACE "^(${e_relvar}/+)?(.+)$" "\\2" result "${pkg_path}") - if (NOT IS_ABSOLUTE "${result}") - string(JOIN "/" result ${CIP_BASE_SUBDIR} "${result}") + if (IS_ABSOLUTE "${result}") + message(FATAL_ERROR "unable to calculate relative install path for ${PATH} in project ${CETMODULES_CURRENT_PROJECT_NAME}") endif() + string(JOIN "/" result ${CIP_BASE_SUBDIR} "${result}") set(${OUT_VAR} "${result}" PARENT_SCOPE) endfunction()