Skip to content

Commit

Permalink
Fix BASE_SUBDIR behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Dec 1, 2023
1 parent dd3fcb2 commit 5ff0b3c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Modules/CetInstalledPath.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ function(cet_installed_path OUT_VAR)
cet_regex_escape("${${CETMODULES_CURRENT_PROJECT_NAME}_EXEC_PREFIX}" VAR e_exec_prefix)
string(REGEX REPLACE "^(${e_exec_prefix}/+)?(.+)$" "\\2" relvar "${${CETMODULES_CURRENT_PROJECT_NAME}_${CIP_RELATIVE_VAR}}")
cet_regex_escape("${relvar}" VAR e_relvar)
string(REGEX REPLACE "^(${e_relvar}/+)?(.+)$" "\\2" result "${pkg_path}")
else()
cet_regex_escape("${CIP_RELATIVE}" VAR e_relvar)
string(REGEX REPLACE "^(${e_relvar}/+)?(.+)$" "\\2" result "${pkg_path}")
endif()
if (result)
set(${OUT_VAR} "${result}/${CIP_BASE_SUBDIR}" PARENT_SCOPE)
else()
set(${OUT_VAR} "${PATH}/${CIP_BASE_SUBDIR}" PARENT_SCOPE)
string(REGEX REPLACE "^(${e_relvar}/+)?(.+)$" "\\2" result "${pkg_path}")
if (NOT IS_ABSOLUTE "${result}")
string(JOIN "/" result ${CIP_BASE_SUBDIR} "${result}")
endif()
set(${OUT_VAR} "${result}" PARENT_SCOPE)
endfunction()

0 comments on commit 5ff0b3c

Please sign in to comment.