From 67aa8fa9707a02ac07a7b6b51918a1a2d72e6c2e Mon Sep 17 00:00:00 2001 From: Kyle Knoepfel Date: Fri, 19 Jan 2024 16:04:04 -0600 Subject: [PATCH] Remaining changes a la Chris' suggestions --- Modules/CetTransitivePaths.cmake | 17 +++++++---------- doc/reference/manual/cetmodules-commands.7.rst | 1 + doc/reference/module/CetTransitivePaths.rst | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 doc/reference/module/CetTransitivePaths.rst diff --git a/Modules/CetTransitivePaths.cmake b/Modules/CetTransitivePaths.cmake index 4f32a41e..535c0f21 100644 --- a/Modules/CetTransitivePaths.cmake +++ b/Modules/CetTransitivePaths.cmake @@ -27,7 +27,8 @@ include_guard() cet_transitive_paths( [] [IN_TREE] [PROJECT ]) - .. seealso:: :command:`cet_localize_pv`. + .. seealso:: :command:`cet_localize_pv` + Options ^^^^^^^ @@ -52,36 +53,32 @@ include_guard() #]================================================================] function(cet_transitive_paths PATH) - cmake_parse_arguments(PARSE_ARGV 1 CTP "IN_TREE;BINARY;SOURCE;TRY_BINARY" "PROJECT" "") - cet_passthrough(FLAG APPEND CTP_BINARY clpv_args) - cet_passthrough(FLAG APPEND CTP_SOURCE clpv_args) - cet_passthrough(FLAG APPEND CTP_TRY_BINARY clpv_args) + cmake_parse_arguments(PARSE_ARGV 1 CTP "IN_TREE" "PROJECT" "") set(PKG ${CETMODULES_CURRENT_PROJECT_NAME}) if (CTP_PROJECT) set(PKG ${CTP_PROJECT}) endif() - _cet_transitive_project_names(${PKG} PNAMES_RESULT CTP_IN_TREE) + _cet_transitive_project_names(${PKG} PNAMES_RESULT) foreach(DEP IN LISTS PNAMES_RESULT) if (DEFINED CACHE{CETMODULES_${PATH}_PROPERTIES_PROJECT_${DEP}}) - cet_localize_pv(${DEP} ${PATH} ${clpv_args}) + cet_localize_pv(${DEP} ${PATH} ${CTP_UNPARSED_ARGUMENTS}) endif() list(APPEND TRANSITIVE_PATHS_TMP ${${DEP}_${PATH}}) endforeach() set(TRANSITIVE_PATHS_WITH_${PATH} ${TRANSITIVE_PATHS_TMP} PARENT_SCOPE) - endfunction() function(_cet_transitive_project_names PKG RESULT_LIST) set(RESULT_LIST_TMP ${${RESULT_LIST}}) foreach(DEP IN LISTS CETMODULES_FIND_DEPS_PNAMES_PROJECT_${PKG}) if (PKG STREQUAL DEP OR - (ARGN STREQUAL "IN_TREE" AND NOT ${DEP}_IN_TREE)) + (CTP_IN_TREE AND NOT ${DEP}_IN_TREE)) continue() endif() if (NOT "${DEP}" IN_LIST RESULT_LIST_TMP) - _cet_transitive_project_names("${DEP}" RESULT_LIST_TMP ${ARGN}) + _cet_transitive_project_names("${DEP}" RESULT_LIST_TMP) endif() endforeach() list(PREPEND RESULT_LIST_TMP ${PKG}) diff --git a/doc/reference/manual/cetmodules-commands.7.rst b/doc/reference/manual/cetmodules-commands.7.rst index 5c5538c9..32982e31 100644 --- a/doc/reference/manual/cetmodules-commands.7.rst +++ b/doc/reference/manual/cetmodules-commands.7.rst @@ -70,6 +70,7 @@ Utility * :command:`cet_test_env_mod` * :command:`cet_test_env_prepend` * :command:`cet_timestamp` +* :command:`cet_transitive_paths` * :command:`cet_version_cmp` * :command:`cet_write_plugin_builder` * :command:`parse_version_string` diff --git a/doc/reference/module/CetTransitivePaths.rst b/doc/reference/module/CetTransitivePaths.rst new file mode 100644 index 00000000..6fed284d --- /dev/null +++ b/doc/reference/module/CetTransitivePaths.rst @@ -0,0 +1 @@ +.. cmake-module:: /../../Modules/CetTransitivePaths.cmake