Skip to content

Commit

Permalink
Detect failure to calculate relative install path
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Dec 1, 2023
1 parent 5ff0b3c commit c3dbe76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Modules/CetInstalledPath.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit c3dbe76

Please sign in to comment.