From 27b17320206b5a565e5a29f0ae520fe955de713d Mon Sep 17 00:00:00 2001 From: "Roscoe A. Bartlett" Date: Wed, 28 Jun 2023 15:04:16 -0600 Subject: [PATCH] Automatic snapshot commit from tribits at 1a9b519a Origin repo remote tracking branch: 'github/master' Origin repo remote repo URL: 'github = git@github.com:TriBITSPub/TriBITS.git' Git describe: vera-release-3.5-start-1806-ge88b8af8 At commit: commit 1a9b519a5cd6005d299be5d07c8823a6a87c974e Author: Roscoe A. Bartlett Date: Tue Jun 27 17:28:15 2023 -0600 Summary: Only submit warning for existing ignored package dir in WARNING mode (trilinos/Trilinos#11976) --- .../package_arch/TribitsGlobalMacros.cmake | 76 ---------------- .../TribitsPackagingSupport.cmake | 89 ++++++++++++++++--- .../TribitsProcessPackagesAndDirsLists.cmake | 4 +- 3 files changed, 81 insertions(+), 88 deletions(-) diff --git a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake index 41479d273f28..28c0fa807ee0 100644 --- a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake +++ b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake @@ -1134,82 +1134,6 @@ macro(tribits_setup_installation_paths) endmacro() -# -# Macros to process repository specializaiton call-back functions -# -# NOTE: The Tribits system promises to only include these call-back files once -# (in order) and to only the call call-back macros they provide once (in -# order). -# - - -macro(create_empty_tribits_repository_setup_extra_options) - macro(tribits_repository_setup_extra_options) - endmacro() -endmacro() - - -macro(tribits_repository_setup_extra_options_runner REPO_NAME) - set(CALLBACK_SETUP_EXTRA_OPTIONS_FILE - "${${REPO_NAME}_SOURCE_DIR}/cmake/CallbackSetupExtraOptions.cmake") - #print_var(CALLBACK_SETUP_EXTRA_OPTIONS_FILE) - if (EXISTS ${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}) - if (${PROJECT_NAME}_VERBOSE_CONFIGURE) - message("Processing call-back file and macros in" - " '${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}'") - endif() - # Define the callback macros as empty in case it is not defined - # in this file. - create_empty_tribits_repository_setup_extra_options() - # Include the file which will define the callback macros - set(REPOSITORY_NAME ${REPO_NAME}) - tribits_trace_file_processing(REPOSITORY INCLUDE - "${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}") - include(${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}) - # Call the callback macros to inject repository-specific behavir - tribits_repository_setup_extra_options() - # Set back the callback macros to empty to ensure that nonone calls them - create_empty_tribits_repository_setup_extra_options() - endif() -endmacro() - - -macro(create_empty_tribits_repository_define_packaging) - macro(tribits_repository_define_packaging) - endmacro() -endmacro() - - -macro(tribits_repository_define_packaging_runner REPO_NAME) - set(CALLBACK_DEFINE_PACKAGING_FILE - "${${REPO_NAME}_SOURCE_DIR}/cmake/CallbackDefineRepositoryPackaging.cmake") - #print_var(CALLBACK_DEFINE_PACKAGING_FILE) - if (EXISTS ${CALLBACK_DEFINE_PACKAGING_FILE}) - if (${PROJECT_NAME}_VERBOSE_CONFIGURE) - message("Processing call-back file and macros in" - " '${CALLBACK_DEFINE_PACKAGING_FILE}'") - endif() - # Define the callback macros as empty in case it is not defined - # in this file. - create_empty_tribits_repository_define_packaging() - # Include the file which will define the callback macros - tribits_trace_file_processing(REPOSITORY INCLUDE - "${CALLBACK_DEFINE_PACKAGING_FILE}") - include(${CALLBACK_DEFINE_PACKAGING_FILE}) - # Call the callback macros to inject repository-specific behavir - tribits_repository_define_packaging() - # Set back the callback macros to empty to ensure that nonone calls them - create_empty_tribits_repository_define_packaging() - endif() -endmacro() - - -macro(create_empty_tribits_project_define_packaging) - macro(tribits_project_define_packaging) - endmacro() -endmacro() - - # Read in the Project's native repositories. # # On output, the variable ${PRJOECT_NAME}_NATIVE_REPOSITORIES is set. diff --git a/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake b/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake index 5e269691865e..e4dc246368d5 100644 --- a/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake +++ b/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake @@ -186,16 +186,6 @@ macro(tribits_setup_packaging_and_distribution) [.]gitignore$ ) - # Print the set of excluded files - if(${PROJECT_NAME}_VERBOSE_CONFIGURE OR - ${PROJECT_NAME}_DUMP_CPACK_SOURCE_IGNORE_FILES - ) - message("Exclude files when building source packages") - foreach(item ${CPACK_SOURCE_IGNORE_FILES}) - message(${item}) - endforeach() - endif() - # K.3) Set up install component dependencies tribits_get_sublist_enabled( @@ -254,6 +244,16 @@ macro(tribits_setup_packaging_and_distribution) endforeach() endif() + # Print the set of excluded files + if(${PROJECT_NAME}_VERBOSE_CONFIGURE OR + ${PROJECT_NAME}_DUMP_CPACK_SOURCE_IGNORE_FILES + ) + message("Exclude files when building source packages:") + foreach(item IN LISTS CPACK_SOURCE_IGNORE_FILES) + message(${item}) + endforeach() + endif() + # K.8) Finally process with CPack include(CPack) @@ -281,7 +281,74 @@ macro(tribits_project_define_packaging_runner) include(${CALLBACK_DEFINE_PACKAGING_FILE}) # Call the callback macros to inject project-specific behavir tribits_project_define_packaging() - # Set back the callback macros to empty to ensure that nonone calls them + # Set back the callback macros to empty to ensure that no-one calls them create_empty_tribits_project_define_packaging() endif() endmacro() + + +macro(create_empty_tribits_repository_setup_extra_options) + macro(tribits_repository_setup_extra_options) + endmacro() +endmacro() + + +macro(tribits_repository_setup_extra_options_runner REPO_NAME) + set(CALLBACK_SETUP_EXTRA_OPTIONS_FILE + "${${REPO_NAME}_SOURCE_DIR}/cmake/CallbackSetupExtraOptions.cmake") + #print_var(CALLBACK_SETUP_EXTRA_OPTIONS_FILE) + if (EXISTS ${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}) + if (${PROJECT_NAME}_VERBOSE_CONFIGURE) + message("Processing call-back file and macros in" + " '${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}'") + endif() + # Define the callback macros as empty in case it is not defined + # in this file. + create_empty_tribits_repository_setup_extra_options() + # Include the file which will define the callback macros + set(REPOSITORY_NAME ${REPO_NAME}) + tribits_trace_file_processing(REPOSITORY INCLUDE + "${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}") + include(${CALLBACK_SETUP_EXTRA_OPTIONS_FILE}) + # Call the callback macros to inject repository-specific behavir + tribits_repository_setup_extra_options() + # Set back the callback macros to empty to ensure that nonone calls them + create_empty_tribits_repository_setup_extra_options() + endif() +endmacro() + + +macro(create_empty_tribits_repository_define_packaging) + macro(tribits_repository_define_packaging) + endmacro() +endmacro() + + +macro(tribits_repository_define_packaging_runner REPO_NAME) + set(CALLBACK_DEFINE_PACKAGING_FILE + "${${REPO_NAME}_SOURCE_DIR}/cmake/CallbackDefineRepositoryPackaging.cmake") + #print_var(CALLBACK_DEFINE_PACKAGING_FILE) + if (EXISTS ${CALLBACK_DEFINE_PACKAGING_FILE}) + if (${PROJECT_NAME}_VERBOSE_CONFIGURE) + message("Processing call-back file and macros in" + " '${CALLBACK_DEFINE_PACKAGING_FILE}'") + endif() + # Define the callback macros as empty in case it is not defined + # in this file. + create_empty_tribits_repository_define_packaging() + # Include the file which will define the callback macros + tribits_trace_file_processing(REPOSITORY INCLUDE + "${CALLBACK_DEFINE_PACKAGING_FILE}") + include(${CALLBACK_DEFINE_PACKAGING_FILE}) + # Call the callback macros to inject repository-specific behavir + tribits_repository_define_packaging() + # Set back the callback macros to empty to ensure that nonone calls them + create_empty_tribits_repository_define_packaging() + endif() +endmacro() + + +macro(create_empty_tribits_project_define_packaging) + macro(tribits_project_define_packaging) + endmacro() +endmacro() diff --git a/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake b/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake index 687ddb59da0c..4fd5f1d96b5f 100644 --- a/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake +++ b/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake @@ -562,7 +562,9 @@ macro(tribits_process_packages_and_dirs_lists REPOSITORY_NAME REPOSITORY_DIR) " '${packageDependenciesFile}' does *NOT* exist!" "\n***\n" ) message(FATAL_ERROR "Stopping due to above error!") - elseif((NOT PACKAGE_EXISTS) AND (EXISTS "${PACKAGE_ABS_DIR}")) + elseif((NOT PACKAGE_EXISTS) AND (EXISTS "${PACKAGE_ABS_DIR}") + AND (${PROJECT_NAME}_ASSERT_DEFINED_DEPENDENCIES STREQUAL "WARNING") + ) message(WARNING "${TRIBITS_PACKAGE}: Package base directory '${PACKAGE_ABS_DIR}'" " exists but the dependencies file '${packageDependenciesFile}' does *NOT*" " exist! Package is being ignored anyway!")