diff --git a/cmake/tribits/CHANGELOG.md b/cmake/tribits/CHANGELOG.md index 00ee3427aa03..b3f1edd1ef0d 100644 --- a/cmake/tribits/CHANGELOG.md +++ b/cmake/tribits/CHANGELOG.md @@ -2,7 +2,33 @@ ChangeLog for TriBITS ---------------------------------------- -## 2023-5-03: +## 2023-06-22: + +* **Added:** Packages are now determined to be missing if their dependencies + file `/cmake/Dependencies.cmake` is missing. If the package + directory `` exists but the dependencies file is missing, the + package is determined to be missing but a warning is printed. (This expands + behavior to gracefully deal with a situation where a package source + directory is only partially removed, such as with `git rm -r `, + but the base directory still exists. Therefore, this allows the project to + gracefully configure with the package being considered missing and avoids a + fatal error in this case.) + +## 2023-06-02: + +* **Added/Deprecated:** External packages/TPLs can now be (and should be) + listed in the `[TEST|LIB]_[REQUIRED|OPTIONAL]_PACKAGES` arguments/lists in + the macro `tribits_package_define_dependencies()` and the + `[TEST|LIB]_[REQUIRED|OPTIONAL]_TPLS` arguments/lists are deprecated (but + with no deprecation warning yet). This makes it easier to write + `/cmake/Dependencies.cmake` files for packages where the set of + internal and external upstream dependent packages is dynamic and changes + depending on the TriBITS project where these package are configured under. + (And conceptually, a downstream package should not care if an upstream + dependent package is pulled in as an external package or built as an + internal package.) + +## 2023-05-03: * **Added:** Added support for non-fully TriBITS-compatible external packages. Now, a `Config.cmake` file need not define diff --git a/cmake/tribits/ci_support/TribitsWriteXmlDependenciesFiles.cmake b/cmake/tribits/ci_support/TribitsWriteXmlDependenciesFiles.cmake index 2360acf1628e..0173750f19e8 100644 --- a/cmake/tribits/ci_support/TribitsWriteXmlDependenciesFiles.cmake +++ b/cmake/tribits/ci_support/TribitsWriteXmlDependenciesFiles.cmake @@ -45,6 +45,9 @@ ################################################################################ +include(TribitsConfigureTiming) + + # @MACRO: tribits_write_xml_dependency_files() # # Usage:: diff --git a/cmake/tribits/core/package_arch/TribitsConfigureTiming.cmake b/cmake/tribits/core/package_arch/TribitsConfigureTiming.cmake new file mode 100644 index 000000000000..00db385c1767 --- /dev/null +++ b/cmake/tribits/core/package_arch/TribitsConfigureTiming.cmake @@ -0,0 +1,97 @@ +# @HEADER +# ************************************************************************ +# +# TriBITS: Tribal Build, Integrate, and Test System +# Copyright 2013 Sandia Corporation +# +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the Corporation nor the names of the +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# ************************************************************************ +# @HEADER + + +include(TimingUtils) + + +# Optionally start CMake code configure timing +# +function(tribits_config_code_start_timer START_TIMER_SECONDS_VAR_OUT) + if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING) + timer_get_raw_seconds(START_TIMER_SECONDS) + set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE) + endif() +endfunction() + + +# Optionally stop CMake code configure timing +# +function(tribits_config_code_stop_timer START_TIMER_SECONDS_VAR_IN + TIMER_STR + ) + if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING) + timer_get_raw_seconds(TIMER_STOP_SECONDS) + timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}} + ${TIMER_STOP_SECONDS} + "${TIMER_STR}") + endif() +endfunction() + + +# Optionally start CMake code **package** configure timing +# +function(tribits_package_config_code_start_timer START_TIMER_SECONDS_VAR_OUT) + if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING + AND + ( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING + OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING ) + ) + timer_get_raw_seconds(START_TIMER_SECONDS) + set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE) + endif() +endfunction() + + +# Optionally stop CMake code **package** configure timing +# +function(tribits_package_config_code_stop_timer START_TIMER_SECONDS_VAR_IN + TIMER_STR + ) + if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING + AND + ( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING + OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING ) + ) + timer_get_raw_seconds(TIMER_STOP_SECONDS) + timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}} + ${TIMER_STOP_SECONDS} + "${TIMER_STR}") + endif() +endfunction() diff --git a/cmake/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake b/cmake/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake index a136e8f34135..b35afaea47b4 100644 --- a/cmake/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake +++ b/cmake/tribits/core/package_arch/TribitsFindMostRecentFileTimestamp.cmake @@ -37,6 +37,9 @@ # ************************************************************************ # @HEADER + +include(TribitsConfigureTiming) + include(CMakeParseArguments) diff --git a/cmake/tribits/core/package_arch/TribitsGeneralMacros.cmake b/cmake/tribits/core/package_arch/TribitsGeneralMacros.cmake index 0dc079655a34..8236e47a5bef 100644 --- a/cmake/tribits/core/package_arch/TribitsGeneralMacros.cmake +++ b/cmake/tribits/core/package_arch/TribitsGeneralMacros.cmake @@ -46,62 +46,6 @@ include(TribitsDeprecatedHelpers) include(TribitsGetPackageEnableStatus) -# Optionally start CMake code configure timing -# -function(tribits_config_code_start_timer START_TIMER_SECONDS_VAR_OUT) - if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING) - timer_get_raw_seconds(START_TIMER_SECONDS) - set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE) - endif() -endfunction() - - -# Optionally stop CMake code configure timing -# -function(tribits_config_code_stop_timer START_TIMER_SECONDS_VAR_IN - TIMER_STR - ) - if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING) - timer_get_raw_seconds(TIMER_STOP_SECONDS) - timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}} - ${TIMER_STOP_SECONDS} - "${TIMER_STR}") - endif() -endfunction() - - -# Optionally start CMake code **package** configure timing -# -function(tribits_package_config_code_start_timer START_TIMER_SECONDS_VAR_OUT) - if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING - AND - ( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING - OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING ) - ) - timer_get_raw_seconds(START_TIMER_SECONDS) - set(${START_TIMER_SECONDS_VAR_OUT} ${START_TIMER_SECONDS} PARENT_SCOPE) - endif() -endfunction() - - -# Optionally stop CMake code **package** configure timing -# -function(tribits_package_config_code_stop_timer START_TIMER_SECONDS_VAR_IN - TIMER_STR - ) - if (${PROJECT_NAME}_ENABLE_CONFIGURE_TIMING - AND - ( ${PROJECT_NAME}_ENABLE_PACKAGE_CONFIGURE_TIMING - OR ${TRIBITS_PACKAGE}_PACKAGE_CONFIGURE_TIMING ) - ) - timer_get_raw_seconds(TIMER_STOP_SECONDS) - timer_print_rel_time(${${START_TIMER_SECONDS_VAR_IN}} - ${TIMER_STOP_SECONDS} - "${TIMER_STR}") - endif() -endfunction() - - # Set the combined directory name taking into account '.' repos. # function(tribits_get_repo_name REPO_DIR REPO_NAME_OUT) diff --git a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake index 5315bb0a6ad8..41479d273f28 100644 --- a/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake +++ b/cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake @@ -52,6 +52,7 @@ include(TribitsReadAllProjectDepsFilesCreateDepsGraph) include(TribitsAdjustPackageEnables) include(TribitsGitRepoVersionInfo) include(TribitsSetUpEnabledOnlyDependencies) +include(TribitsConfigureTiming) # Standard TriBITS utilities includes include(TribitsAddOptionAndDefine) @@ -1209,30 +1210,6 @@ macro(create_empty_tribits_project_define_packaging) endmacro() -macro(tribits_project_define_packaging_runner) - set(CALLBACK_DEFINE_PACKAGING_FILE - "${PROJECT_SOURCE_DIR}/cmake/CallbackDefineProjectPackaging.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_project_define_packaging() - # Include the file which will define the callback macros - tribits_trace_file_processing(PROJECT INCLUDE - "${CALLBACK_DEFINE_PACKAGING_FILE}") - 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 - create_empty_tribits_project_define_packaging() - endif() -endmacro() - - # Read in the Project's native repositories. # # On output, the variable ${PRJOECT_NAME}_NATIVE_REPOSITORIES is set. @@ -2297,150 +2274,6 @@ macro(tribits_configure_enabled_packages) endmacro() -# Set up for packaging and distribution -# -macro(tribits_setup_packaging_and_distribution) - - tribits_config_code_start_timer(CPACK_SETUP_TIME_START_SECONDS) - - # K.1) Run callback function for the base project. - - tribits_project_define_packaging_runner() - # The above must define the basic project settings for CPACK that are - # specific to the project and should not be provided by the user. - - # K.2) Removing any packages or packages not enabled from the tarball - - if (${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION) - set(tribitsPackageList ${${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES}) - else() - set(tribitsPackageList ${${PROJECT_NAME}_DEFINED_INTERNAL_TOPLEVEL_PACKAGES}) - endif() - - tribits_get_sublist_nonenabled(tribitsPackageList nonEnabledTribitsPackage "") - - foreach(TRIBITS_PACKAGE ${nonEnabledTribitsPackage}) - - # Determine if this is a package to not ignore - find_list_element(TRIBITS_CPACK_PACKAGES_TO_NOT_IGNORE - ${TRIBITS_PACKAGE} TRIBITS_PACKAGE_DONT_IGNORE) - - if (NOT TRIBITS_PACKAGE_DONT_IGNORE) - - # Checking if we have a relative path to the package's files. Since the - # exclude is a regular expression any "../" will be interpreted as / which would never match the package's actual - # directory. There isn't a direct way in cmake to convert a relative - # path into an absolute path with string operations so as a way of - # making sure that we get the correct path of the package we use a - # find_path for the CMakeLists.txt file for the package. Since the - # package has to have this file to work correctly it should be - # guaranteed to be there. - string(REGEX MATCH "[.][.]/" RELATIVE_PATH_CHARS_MATCH - ${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}) - if ("${RELATIVE_PATH_CHARS_MATCH}" STREQUAL "") - set(CPACK_SOURCE_IGNORE_FILES - "${PROJECT_SOURCE_DIR}/${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}/" - ${CPACK_SOURCE_IGNORE_FILES}) - else() - find_path(ABSOLUTE_PATH CMakeLists.txt PATHS - "${PROJECT_SOURCE_DIR}/${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}" - NO_DEFAULT_PATH) - if ("${ABSOLUTE_PATH}" STREQUAL "ABSOLUTE_PATH-NOTFOUND") - message(AUTHOR_WARNING "Relative path found for disabled package" - " ${TRIBITS_PACKAGE} but package was missing a CMakeLists.txt file." - " This disabled package will likely not be excluded from a source release") - endif() - set(CPACK_SOURCE_IGNORE_FILES ${ABSOLUTE_PATH} ${CPACK_SOURCE_IGNORE_FILES}) - endif() - endif() - - endforeach() - - # Add excludes for VC files/dirs - set(CPACK_SOURCE_IGNORE_FILES - ${CPACK_SOURCE_IGNORE_FILES} - /[.]git/ - [.]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( - ${PROJECT_NAME}_DEFINED_INTERNAL_TOPLEVEL_PACKAGES - enabledInternalToplevelPackages "") - - foreach(pkgName ${enabledInternalToplevelPackages}) - if(NOT "${${pkgName}_LIB_ENABLED_DEPENDENCIES}" STREQUAL "") - string(TOUPPER ${pkgName} upperPkgName) - set(CPACK_COMPONENT_${upperPkgName}_DEPENDS ${${pkgName}_LIB_ENABLED_DEPENDENCIES}) - # ToDo: The above needs to be changed to the list of *internal* enabled - # package dependencies! (But there are no tests for this currently and - # I am not sure who is using this.) - endif() - endforeach() - - # K.4) Resetting the name to avoid overwriting registry keys when installing - - if(WIN32) - set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${${PROJECT_NAME}_VERSION}") - if (TPL_ENABLE_MPI) - set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-mpi") - ELSE () - set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-serial") - endif() - set(CPACK_GENERATOR "NSIS") - set(CPACK_NSIS_MODIFY_PATH OFF) - endif() - - # K.5) Determine the source generator - if ("${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT}" STREQUAL "") - set(${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT "TGZ") - endif() - set(${PROJECT_NAME}_CPACK_SOURCE_GENERATOR - ${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT} - CACHE STRING - "The types of source generators to use for CPACK_SOURCE_GENERATOR.") - set(CPACK_SOURCE_GENERATOR ${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR}) - - # K.6) Loop through the Repositories and run their callback functions. - foreach(REPO ${${PROJECT_NAME}_ALL_REPOSITORIES}) - tribits_get_repo_name_dir(${REPO} REPO_NAME REPO_DIR) - if (${PROJECT_NAME}_VERBOSE_CONFIGURE) - message("Processing packaging call-backs for ${REPO_NAME}") - endif() - tribits_repository_define_packaging_runner(${REPO_NAME}) - endforeach() - - # K.7) Include RepoVersion.txt if generated - set(PROJECT_REPO_VERSION_FILE - "${CMAKE_CURRENT_BINARY_DIR}/${${PROJECT_NAME}_REPO_VERSION_FILE_NAME}") - if (EXISTS "${PROJECT_REPO_VERSION_FILE}") - foreach(SOURCE_GEN ${CPACK_SOURCE_GENERATOR}) - set(CPACK_INSTALL_COMMANDS ${CPACK_INSTALL_COMMANDS} - "${CMAKE_COMMAND} -E copy '${PROJECT_REPO_VERSION_FILE}' '${CMAKE_CURRENT_BINARY_DIR}/_CPack_Packages/Linux-Source/${SOURCE_GEN}/${CPACK_PACKAGE_NAME}-${${PROJECT_NAME}_VERSION}-Source/${${PROJECT_NAME}_REPO_VERSION_FILE_NAME}'") - endforeach() - endif() - - # K.8) Finally process with CPack - include(CPack) - - tribits_config_code_stop_timer(CPACK_SETUP_TIME_START_SECONDS - "Total time to set up for CPack packaging") - -endmacro() - - # Create custom 'install_package_by_package' target # function(tribits_add_install_package_by_package_target) @@ -2488,104 +2321,6 @@ macro(tribits_setup_for_installation) endmacro() - -# @MACRO: tribits_exclude_files() -# -# Exclude package files/dirs from the source distribution by appending -# ``CPACK_SOURCE_IGNORE_FILES``. -# -# Usage:: -# -# tribits_exclude_files( ...) -# -# This is called in the top-level parent package's -# `/CMakeLists.txt`_ file and each file or directory name -# ```` is actually interpreted by CMake/CPack as a regex that is -# prefixed by the project's and package's source directory names so as to not -# exclude files and directories of the same name and path from other packages. -# If ```` is an absolute path it is not prefixed but is appended to -# ``CPACK_SOURCE_IGNORE_FILES`` unmodified. -# -# In general, do **NOT** put in excludes for files and directories that are -# not under this package's source tree. If the given package is not enabled, -# then this command will never be called! For example, don't put in excludes -# for PackageB's files in PackageA's ``CMakeLists.txt`` file because if -# PackageB is enabled but PackageA is not, the excludes for PackageB will -# never get added to ``CPACK_SOURCE_IGNORE_FILES``. -# -# Also, be careful to note that the ```` arguments are actually regexes -# and one must be very careful to understand how CPack will use these regexes -# to match files that get excluded from the tarball. For more details, see -# `Creating Source Distributions`_. -# -macro(tribits_exclude_files) - - if (NOT "${${PACKAGE_NAME}_PARENT_PACKAGE}" STREQUAL "") - message(FATAL_ERROR - "ERROR: tribits_exclude_files() was called in a subpackage CmakeLists.txt file!" - " Instead, move this call to the file" - " ${${${PACKAGE_NAME}_PARENT_PACKAGE}_SOURCE_DIR}/CMakeLists.txt" - " and adjust the paths accordingly!" ) - endif() - - set(FILES_TO_EXCLUDE ${ARGN}) - - # Need to add "///" to each file to prevent - # someone from trying to exclude a file like "readme" and having it - # inadvertently exclude a file matching that name in another package. - set(MODIFIED_FILES_TO_EXCLUDE "") - - set(${PROJECT_NAME}_SOURCE_PATH ${${PROJECT_NAME}_SOURCE_DIR}) - - foreach(FILE ${FILES_TO_EXCLUDE}) - #Ensure that if the full path was specified for the file that we don't add - #"///" again. - set(MATCH_STRING "${${PACKAGE_NAME}_SOURCE_DIR}") - string(REGEX MATCH ${MATCH_STRING} MATCHED ${FILE} ) - if(NOT MATCHED) - list(APPEND MODIFIED_FILES_TO_EXCLUDE - "${${PACKAGE_NAME}_SOURCE_DIR}/${FILE}") - else() - list(APPEND MODIFIED_FILES_TO_EXCLUDE ${FILE}) - endif() - endforeach() - -#Leaving in for debugging purposes -# message("List of files being excluded for package ${PACKAGE_NAME}") -# foreach(NEW_FILE ${MODIFIED_FILES_TO_EXCLUDE}) -# message(${NEW_FILE}) -# endforeach() - - list(APPEND CPACK_SOURCE_IGNORE_FILES ${MODIFIED_FILES_TO_EXCLUDE}) - if (NOT ${PROJECT_NAME}_BINARY_DIR STREQUAL ${PACKAGE_NAME}_BINARY_DIR) - set(CPACK_SOURCE_IGNORE_FILES ${CPACK_SOURCE_IGNORE_FILES} PARENT_SCOPE) - endif() - -endmacro() - - -# Exclude files only for the packages that will not be supporting autotools. -# -macro(tribits_exclude_autotools_files) # PACKAGE_NAME LIST_RETURN) - set(AUTOTOOLS_FILES - configure.ac$ - configure$ - Makefile.am$ - Makefile.in$ - bootstrap$ - .*[.]m4$ - config/ - ) - - set(FILES_TO_EXCLUDE) - foreach(FILE ${AUTOTOOLS_FILES}) - list(APPEND FILES_TO_EXCLUDE ${FILE} \(.*/\)*${FILE}) - endforeach() - - tribits_exclude_files(${FILES_TO_EXCLUDE}) - -endmacro() - # LocalWords: # LocalWords: Sandia SANDIA Redistributions # LocalWords: tribits TriBITS TRIBITS diff --git a/cmake/tribits/core/package_arch/TribitsPackageDefineDependencies.cmake b/cmake/tribits/core/package_arch/TribitsPackageDefineDependencies.cmake index c2136eb745b5..a5584fb85a08 100644 --- a/cmake/tribits/core/package_arch/TribitsPackageDefineDependencies.cmake +++ b/cmake/tribits/core/package_arch/TribitsPackageDefineDependencies.cmake @@ -57,12 +57,12 @@ include(TribitsGeneralMacros) # [LIB_OPTIONAL_TPLS ...] # [TEST_REQUIRED_TPLS ...] # [TEST_OPTIONAL_TPLS ...] -# [REGRESSION_EMAIL_LIST ] # [SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS # # # ... # ] +# [REGRESSION_EMAIL_LIST ] # ) # # Every argument in this macro is optional (that is, an package can have no @@ -84,9 +84,9 @@ include(TribitsGeneralMacros) # ``TEST_REQUIRED_PACKAGES`` # # List of additional upstream packages that must be enabled in order to -# build and/or run the tests and/or examples in this package. If any -# of these upstream packages are not enabled, then there will be no -# tests or examples defined or run for this package. +# build and/or run the tests and/or examples in this package. If any of +# these upstream packages are not enabled, then there will be no tests or +# examples defined or run for this package. # # ``TEST_OPTIONAL_PACKAGES`` # @@ -94,39 +94,52 @@ include(TribitsGeneralMacros) # tests in this package. These upstream packages need not be enabled in # order to run some basic tests or examples for this package. Typically, # extra tests that depend on optional test packages involve integration -# testing of some type. +# testing of some type. Not enabling these optional upstream packages +# will result in diminished tests or examples. # # ``LIB_REQUIRED_TPLS`` # -# List of required upstream TPLs that must be enabled in order to build -# and use the libraries (or capabilities) in this package. +# **DEPRECATED:** List of required upstream TPLs that must be enabled in +# order to build and use the libraries (or capabilities) in this package. +# (Add these to ``LIB_REQUIRED_PACKAGES`` instead.) # # ``LIB_OPTIONAL_TPLS`` # -# List of additional optional upstream TPLs that can be used in this -# package if enabled. These upstream TPLs need not be enabled in order to -# use this package but not enabling one or more of these optional upstream -# TPLs will result in diminished capabilities of this package. +# **DEPRECATED:** List of additional optional upstream TPLs that can be +# used in this package if enabled. These upstream TPLs need not be +# enabled in order to use this package but not enabling one or more of +# these optional upstream TPLs will result in diminished capabilities of +# this package. (Add these to ``LIB_OPTIONAL_PACKAGES`` instead.) # # ``TEST_REQUIRED_TPLS`` # -# List of additional upstream TPLs that must be enabled in order to build -# and/or run the tests and/or examples in this package. If any of -# these upstream TPLs are not enabled, then there will be no tests or -# examples defined or run for this package. +# **DEPRECATED:** List of additional upstream TPLs that must be enabled in +# order to build and/or run the tests and/or examples in this package. If +# any of these upstream TPLs are not enabled, then there will be no tests +# or examples defined or run for this package. (Add these to +# ``TEST_REQUIRED_PACKAGES`` instead.) # # ``TEST_OPTIONAL_TPLS`` # -# List of additional optional upstream TPLs that can be used by the tests -# in this package. These upstream TPLs need not be enabled in order to -# run basic tests for this package. Typically, extra tests that depend -# on optional TPLs involve integration testing or some additional testing -# of some type. +# **DEPRECATED:** List of additional optional upstream TPLs that can be +# used by the tests in this package. These upstream TPLs need not be +# enabled in order to run basic tests for this package. Typically, extra +# tests that depend on optional TPLs involve integration testing or some +# additional testing of some type. (Add these to +# ``TEST_OPTIONAL_PACKAGES`` instead.) +# +# NOTE: The ``XXX_TPLS`` arguments/lists are **deprecated**. At the package +# level, there is no distinction between upstream internal and external +# packages (i.e. TPLs) so all upstream package dependencies can (and should) +# be listed in the ``XXX_PACKAGES`` arguments/lists. (There is no change in +# behavior listing upstream packages in ``XXX_PACKAGES`` or the ``XXX_TPLS`` +# arguments/lists.) # # Only upstream packages can be listed (as defined by the order the packages # are listed in `tribits_repository_define_packages()`_ in the -# `/PackagesList.cmake`_ file). Otherwise an error will occur and -# processing will stop. Misspelled package names are caught as well. +# `/PackagesList.cmake`_ or `/TPLsList.cmake`_ files). +# Otherwise an error will occur and processing will stop. Misspelled package +# names are caught as well. # # Only direct package dependencies need to be listed. Indirect package # dependencies are automatically handled. For example, if this package @@ -136,14 +149,10 @@ include(TribitsGeneralMacros) # The dependency on ``PKG1`` will be taken care of automatically by the # TriBITS dependency management system. # -# However, currently, all TPL dependencies must be listed, even the indirect -# ones. This is a requirement that will be dropped in a future version of -# TriBITS. -# # The packages listed in ``LIB_REQUIRED_PACKAGES`` are implicitly also # dependencies in ``TEST_REQUIRED_PACKAGES``. Likewise # ``LIB_OPTIONAL_PACKAGES`` are implicitly also dependencies in -# ``TEST_OPTIONAL_PACKAGES``. Same goes for TPL dependencies. +# ``TEST_OPTIONAL_PACKAGES``. # # The upstream dependencies within a single list do not need to be listed in # any order. For example if ``PKG2`` depends on ``PKG1``, and this given @@ -153,9 +162,7 @@ include(TribitsGeneralMacros) # # or:: # -# "LIB_REQUIRED_PACKAGES PKG1 PKG2 -# -# Likewise the order that dependent TPLs are listed is not significant. +# LIB_REQUIRED_PACKAGES PKG1 PKG2 # # If some upstream packages are allowed to be missing, this can be specified # by calling the macro `tribits_allow_missing_external_packages()`_. @@ -199,27 +206,6 @@ include(TribitsGeneralMacros) # argument is missing, then the email list that CDash errors go to is # determined by other means (see `CDash regression email addresses`_). # -# NOTE: All this macro really does is to just define the variables: -# -# * ``LIB_REQUIRED_DEP_PACKAGES`` -# * ``LIB_OPTIONAL_DEP_PACKAGES`` -# * ``TEST_REQUIRED_DEP_PACKAGES`` -# * ``TEST_OPTIONAL_DEP_PACKAGES`` -# * ``LIB_REQUIRED_DEP_TPLS`` -# * ``LIB_OPTIONAL_DEP_TPLS`` -# * ``TEST_REQUIRED_DEP_TPLS`` -# * ``TEST_OPTIONAL_DEP_TPLS`` -# * ``REGRESSION_EMAIL_LIST`` -# * ``SUBPACKAGES_DIRS_CLASSIFICATIONS_OPTREQS`` -# -# which are then read by the TriBITS cmake code to build the package -# dependency graph. The advantage of using this macro instead of just -# directly setting the variables is that an package only needs to list -# dependencies that exist. Otherwise, the ``Dependencies.cmake`` file will -# need to set all of the above local variables, even those that are empty. -# This is an error checking property of the TriBITS system to avoid misspelling -# the names of these variables. -# macro(tribits_package_define_dependencies) cmake_parse_arguments( diff --git a/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake b/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake new file mode 100644 index 000000000000..5e269691865e --- /dev/null +++ b/cmake/tribits/core/package_arch/TribitsPackagingSupport.cmake @@ -0,0 +1,287 @@ +# @HEADER +# ************************************************************************ +# +# TriBITS: Tribal Build, Integrate, and Test System +# Copyright 2013 Sandia Corporation +# +# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +# the U.S. Government retains certain rights in this software. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the Corporation nor the names of the +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# ************************************************************************ +# @HEADER + + +# TriBITS package_arch includes +include(TribitsConfigureTiming) +include(TribitsGetPackageSublists) + +# TriBITS utils includes +include(FindListElement) + + +# @MACRO: tribits_exclude_files() +# +# Exclude package files/dirs from the source distribution by appending +# ``CPACK_SOURCE_IGNORE_FILES``. +# +# Usage:: +# +# tribits_exclude_files( ...) +# +# This is called in the top-level parent package's +# `/CMakeLists.txt`_ file and each file or directory name +# ```` is actually interpreted by CMake/CPack as a regex that is +# prefixed by the project's and package's source directory names so as to not +# exclude files and directories of the same name and path from other packages. +# If ```` is an absolute path it is not prefixed but is appended to +# ``CPACK_SOURCE_IGNORE_FILES`` unmodified. +# +# In general, do **NOT** put in excludes for files and directories that are +# not under this package's source tree. If the given package is not enabled, +# then this command will never be called! For example, don't put in excludes +# for PackageB's files in PackageA's ``CMakeLists.txt`` file because if +# PackageB is enabled but PackageA is not, the excludes for PackageB will +# never get added to ``CPACK_SOURCE_IGNORE_FILES``. +# +# Also, be careful to note that the ```` arguments are actually regexes +# and one must be very careful to understand how CPack will use these regexes +# to match files that get excluded from the tarball. For more details, see +# `Creating Source Distributions`_. +# +macro(tribits_exclude_files) + + if (NOT "${${PACKAGE_NAME}_PARENT_PACKAGE}" STREQUAL "") + message(FATAL_ERROR + "ERROR: tribits_exclude_files() was called in a subpackage CmakeLists.txt file!" + " Instead, move this call to the file" + " ${${${PACKAGE_NAME}_PARENT_PACKAGE}_SOURCE_DIR}/CMakeLists.txt" + " and adjust the paths accordingly!" ) + endif() + + set(FILES_TO_EXCLUDE ${ARGN}) + + # Need to add "///" to each file to prevent + # someone from trying to exclude a file like "readme" and having it + # inadvertently exclude a file matching that name in another package. + set(MODIFIED_FILES_TO_EXCLUDE "") + + set(${PROJECT_NAME}_SOURCE_PATH ${${PROJECT_NAME}_SOURCE_DIR}) + + foreach(FILE ${FILES_TO_EXCLUDE}) + #Ensure that if the full path was specified for the file that we don't add + #"///" again. + set(MATCH_STRING "${${PACKAGE_NAME}_SOURCE_DIR}") + string(REGEX MATCH ${MATCH_STRING} MATCHED ${FILE} ) + if(NOT MATCHED) + list(APPEND MODIFIED_FILES_TO_EXCLUDE + "${${PACKAGE_NAME}_SOURCE_DIR}/${FILE}") + else() + list(APPEND MODIFIED_FILES_TO_EXCLUDE ${FILE}) + endif() + endforeach() + +#Leaving in for debugging purposes +# message("List of files being excluded for package ${PACKAGE_NAME}") +# foreach(NEW_FILE ${MODIFIED_FILES_TO_EXCLUDE}) +# message(${NEW_FILE}) +# endforeach() + + list(APPEND CPACK_SOURCE_IGNORE_FILES ${MODIFIED_FILES_TO_EXCLUDE}) + if (NOT ${PROJECT_NAME}_BINARY_DIR STREQUAL ${PACKAGE_NAME}_BINARY_DIR) + set(CPACK_SOURCE_IGNORE_FILES ${CPACK_SOURCE_IGNORE_FILES} PARENT_SCOPE) + endif() + +endmacro() + + +# Set up for packaging and distribution +# +macro(tribits_setup_packaging_and_distribution) + + tribits_config_code_start_timer(CPACK_SETUP_TIME_START_SECONDS) + + # K.1) Run callback function for the base project. + + tribits_project_define_packaging_runner() + # The above must define the basic project settings for CPACK that are + # specific to the project and should not be provided by the user. + + # K.2) Removing any packages or packages not enabled from the tarball + + if (${PROJECT_NAME}_EXCLUDE_DISABLED_SUBPACKAGES_FROM_DISTRIBUTION) + set(tribitsPackageList ${${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES}) + else() + set(tribitsPackageList ${${PROJECT_NAME}_DEFINED_INTERNAL_TOPLEVEL_PACKAGES}) + endif() + + tribits_get_sublist_nonenabled(tribitsPackageList nonEnabledTribitsPackage "") + + foreach(TRIBITS_PACKAGE ${nonEnabledTribitsPackage}) + + # Determine if this is a package to not ignore + find_list_element(TRIBITS_CPACK_PACKAGES_TO_NOT_IGNORE + ${TRIBITS_PACKAGE} TRIBITS_PACKAGE_DONT_IGNORE) + + if (NOT TRIBITS_PACKAGE_DONT_IGNORE) + + # Checking if we have a relative path to the package's files. Since the + # exclude is a regular expression any "../" will be interpreted as / which would never match the package's actual + # directory. There isn't a direct way in cmake to convert a relative + # path into an absolute path with string operations so as a way of + # making sure that we get the correct path of the package we use a + # find_path for the CMakeLists.txt file for the package. Since the + # package has to have this file to work correctly it should be + # guaranteed to be there. + string(REGEX MATCH "[.][.]/" RELATIVE_PATH_CHARS_MATCH + ${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}) + if ("${RELATIVE_PATH_CHARS_MATCH}" STREQUAL "") + list(PREPEND CPACK_SOURCE_IGNORE_FILES + "${PROJECT_SOURCE_DIR}/${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}/") + else() + find_path(ABSOLUTE_PATH CMakeLists.txt PATHS + "${PROJECT_SOURCE_DIR}/${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}" + NO_DEFAULT_PATH) + if ("${ABSOLUTE_PATH}" STREQUAL "ABSOLUTE_PATH-NOTFOUND") + message(AUTHOR_WARNING "Relative path found for disabled package" + " ${TRIBITS_PACKAGE} but package was missing a CMakeLists.txt file." + " This disabled package will likely not be excluded from a source release") + endif() + list(PREPEND CPACK_SOURCE_IGNORE_FILES "${ABSOLUTE_PATH}") + endif() + endif() + + endforeach() + + # Add excludes for VC files/dirs + list(APPEND CPACK_SOURCE_IGNORE_FILES + /[.]git/ + [.]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( + ${PROJECT_NAME}_DEFINED_INTERNAL_TOPLEVEL_PACKAGES + enabledInternalToplevelPackages "") + + foreach(pkgName ${enabledInternalToplevelPackages}) + if(NOT "${${pkgName}_LIB_ENABLED_DEPENDENCIES}" STREQUAL "") + string(TOUPPER ${pkgName} upperPkgName) + set(CPACK_COMPONENT_${upperPkgName}_DEPENDS ${${pkgName}_LIB_ENABLED_DEPENDENCIES}) + # ToDo: The above needs to be changed to the list of *internal* enabled + # package dependencies! (But there are no tests for this currently and + # I am not sure who is using this.) + endif() + endforeach() + + # K.4) Resetting the name to avoid overwriting registry keys when installing + + if(WIN32) + set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${${PROJECT_NAME}_VERSION}") + if (TPL_ENABLE_MPI) + set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-mpi") + ELSE () + set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-serial") + endif() + set(CPACK_GENERATOR "NSIS") + set(CPACK_NSIS_MODIFY_PATH OFF) + endif() + + # K.5) Determine the source generator + if ("${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT}" STREQUAL "") + set(${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT "TGZ") + endif() + set(${PROJECT_NAME}_CPACK_SOURCE_GENERATOR + ${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR_DEFAULT} + CACHE STRING + "The types of source generators to use for CPACK_SOURCE_GENERATOR.") + set(CPACK_SOURCE_GENERATOR ${${PROJECT_NAME}_CPACK_SOURCE_GENERATOR}) + + # K.6) Loop through the Repositories and run their callback functions. + foreach(REPO ${${PROJECT_NAME}_ALL_REPOSITORIES}) + tribits_get_repo_name_dir(${REPO} REPO_NAME REPO_DIR) + if (${PROJECT_NAME}_VERBOSE_CONFIGURE) + message("Processing packaging call-backs for ${REPO_NAME}") + endif() + tribits_repository_define_packaging_runner(${REPO_NAME}) + endforeach() + + # K.7) Include RepoVersion.txt if generated + set(PROJECT_REPO_VERSION_FILE + "${CMAKE_CURRENT_BINARY_DIR}/${${PROJECT_NAME}_REPO_VERSION_FILE_NAME}") + if (EXISTS "${PROJECT_REPO_VERSION_FILE}") + foreach(SOURCE_GEN ${CPACK_SOURCE_GENERATOR}) + set(CPACK_INSTALL_COMMANDS ${CPACK_INSTALL_COMMANDS} + "${CMAKE_COMMAND} -E copy '${PROJECT_REPO_VERSION_FILE}' '${CMAKE_CURRENT_BINARY_DIR}/_CPack_Packages/Linux-Source/${SOURCE_GEN}/${CPACK_PACKAGE_NAME}-${${PROJECT_NAME}_VERSION}-Source/${${PROJECT_NAME}_REPO_VERSION_FILE_NAME}'") + endforeach() + endif() + + # K.8) Finally process with CPack + include(CPack) + + tribits_config_code_stop_timer(CPACK_SETUP_TIME_START_SECONDS + "Total time to set up for CPack packaging") + +endmacro() + + +macro(tribits_project_define_packaging_runner) + set(CALLBACK_DEFINE_PACKAGING_FILE + "${PROJECT_SOURCE_DIR}/cmake/CallbackDefineProjectPackaging.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_project_define_packaging() + # Include the file which will define the callback macros + tribits_trace_file_processing(PROJECT INCLUDE + "${CALLBACK_DEFINE_PACKAGING_FILE}") + 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 + create_empty_tribits_project_define_packaging() + endif() +endmacro() diff --git a/cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake b/cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake index 890b4eb23af3..bcc591d6385e 100644 --- a/cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake +++ b/cmake/tribits/core/package_arch/TribitsProcessEnabledTpls.cmake @@ -43,6 +43,7 @@ include(TribitsExternalPackageWithImportedTargetsFindTplModuleHelpers) include(TribitsExternalPackageWriteConfigFile) include(TribitsTplFindIncludeDirsAndLibraries) include(TribitsGeneralMacros) +include(TribitsConfigureTiming) # Standard TriBITS utilities includes include(AppendStringVar) @@ -190,13 +191,19 @@ function(tribits_get_enabled_tpl_processing_string TPL_NAME tplProcessingStrin endfunction() -# Process an enabled TPL defined using a TriBITS-compliant external -# packages Config.cmake file +# Process an enabled TPL defined using a TriBITS-compliant external package +# Config.cmake file # macro(tribits_process_enabled_tribits_compliant_tpl TPL_NAME) message("-- " "Calling find_package(${TPL_NAME}) for TriBITS-compliant external package") find_package(${TPL_NAME} CONFIG REQUIRED) + if (${TPL_NAME}_DIR) + message("-- " "Found ${TPL_NAME}_DIR='${${TPL_NAME}_DIR}'") + else() + message(FATAL_ERROR + "ERROR! Failed to find TriBITS-compliant external package ${TPL_NAME}!") + endif() endmacro() diff --git a/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake b/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake index 447f98265c1b..687ddb59da0c 100644 --- a/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake +++ b/cmake/tribits/core/package_arch/TribitsProcessPackagesAndDirsLists.cmake @@ -535,7 +535,8 @@ macro(tribits_process_packages_and_dirs_lists REPOSITORY_NAME REPOSITORY_DIR) endif() - if (EXISTS ${PACKAGE_ABS_DIR}) + set(packageDependenciesFile "${PACKAGE_ABS_DIR}/cmake/Dependencies.cmake") + if (EXISTS "${packageDependenciesFile}") set(PACKAGE_EXISTS TRUE) else() set(PACKAGE_EXISTS FALSE) @@ -557,9 +558,14 @@ macro(tribits_process_packages_and_dirs_lists REPOSITORY_NAME REPOSITORY_DIR) ) message( "\n***" - "\n*** Error, the package ${TRIBITS_PACKAGE} directory ${PACKAGE_ABS_DIR} does not exist!" + "\n*** Error, the package ${TRIBITS_PACKAGE} dependencies file" + " '${packageDependenciesFile}' does *NOT* exist!" "\n***\n" ) message(FATAL_ERROR "Stopping due to above error!") + elseif((NOT PACKAGE_EXISTS) AND (EXISTS "${PACKAGE_ABS_DIR}")) + message(WARNING "${TRIBITS_PACKAGE}: Package base directory '${PACKAGE_ABS_DIR}'" + " exists but the dependencies file '${packageDependenciesFile}' does *NOT*" + " exist! Package is being ignored anyway!") endif() if (PACKAGE_EXISTS OR ${PROJECT_NAME}_IGNORE_PACKAGE_EXISTS_CHECK) diff --git a/cmake/tribits/core/package_arch/TribitsProjectImpl.cmake b/cmake/tribits/core/package_arch/TribitsProjectImpl.cmake index f27caa3e6687..be62ab071113 100644 --- a/cmake/tribits/core/package_arch/TribitsProjectImpl.cmake +++ b/cmake/tribits/core/package_arch/TribitsProjectImpl.cmake @@ -61,6 +61,7 @@ include(TribitsConstants) tribits_asesrt_minimum_cmake_version() include(TribitsCMakePolicies NO_POLICY_SCOPE) +# TriBITS package_arch includes include(TribitsIncludeDirectories) include(TribitsFindPythonInterp) include(TribitsGlobalMacros) @@ -68,7 +69,10 @@ include(TribitsConfigureCTestCustom) include(TribitsGenerateResourceSpecFile) include(TribitsPackageDependencies) include(TribitsPrintDependencyInfo) +include(TribitsPackagingSupport) +include(TribitsConfigureTiming) +# TriBITS utils includes include(AdvancedSet) include(AdvancedOption) include(TimingUtils) diff --git a/cmake/tribits/core/package_arch/TribitsReadAllProjectDepsFilesCreateDepsGraph.cmake b/cmake/tribits/core/package_arch/TribitsReadAllProjectDepsFilesCreateDepsGraph.cmake index 2b71d8288589..deaa8b5a463b 100644 --- a/cmake/tribits/core/package_arch/TribitsReadAllProjectDepsFilesCreateDepsGraph.cmake +++ b/cmake/tribits/core/package_arch/TribitsReadAllProjectDepsFilesCreateDepsGraph.cmake @@ -44,6 +44,7 @@ include(TribitsProcessExtraRepositoriesList) include(TribitsProcessPackagesAndDirsLists) include(TribitsProcessTplsLists) include(TribitsReadDepsFilesCreateDepsGraph) +include(TribitsConfigureTiming) # Standard TriBITS utilities includes include(TimingUtils) diff --git a/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake b/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake index 4c193adeff75..43b00633686c 100644 --- a/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake +++ b/cmake/tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake @@ -182,8 +182,7 @@ macro(tribits_read_all_package_deps_files_create_deps_graph) set(${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES "") # Packages and subpackages foreach(TRIBITS_PACKAGE IN LISTS ${PROJECT_NAME}_DEFINED_INTERNAL_TOPLEVEL_PACKAGES) - tribits_read_toplevel_package_deps_files_add_to_graph(${TRIBITS_PACKAGE} - ${${TRIBITS_PACKAGE}_REL_SOURCE_DIR}) + tribits_read_toplevel_package_deps_files_add_to_graph(${TRIBITS_PACKAGE}) endforeach() list(LENGTH ${PROJECT_NAME}_DEFINED_INTERNAL_PACKAGES @@ -456,15 +455,21 @@ macro(tribits_process_package_dependencies_lists packageName) set(${packageName}_LIB_DEFINED_DEPENDENCIES "") set(${packageName}_TEST_DEFINED_DEPENDENCIES "") + # Append the XXX_TPLS list on the end of the XXX_PACKAGES list + list(APPEND LIB_REQUIRED_DEP_PACKAGES ${LIB_REQUIRED_DEP_TPLS}) + list(APPEND LIB_OPTIONAL_DEP_PACKAGES ${LIB_OPTIONAL_DEP_TPLS}) + list(APPEND TEST_REQUIRED_DEP_PACKAGES ${TEST_REQUIRED_DEP_TPLS}) + list(APPEND TEST_OPTIONAL_DEP_PACKAGES ${TEST_OPTIONAL_DEP_TPLS}) + set(LIB_REQUIRED_DEP_TPLS "") + set(LIB_OPTIONAL_DEP_TPLS "") + set(TEST_REQUIRED_DEP_TPLS "") + set(TEST_OPTIONAL_DEP_TPLS "") + # Fill the backward dependency vars tribits_set_dep_packages(${packageName} LIB REQUIRED PACKAGES) tribits_set_dep_packages(${packageName} LIB OPTIONAL PACKAGES) - tribits_set_dep_packages(${packageName} LIB REQUIRED TPLS) - tribits_set_dep_packages(${packageName} LIB OPTIONAL TPLS) tribits_set_dep_packages(${packageName} TEST REQUIRED PACKAGES) tribits_set_dep_packages(${packageName} TEST OPTIONAL PACKAGES) - tribits_set_dep_packages(${packageName} TEST REQUIRED TPLS) - tribits_set_dep_packages(${packageName} TEST OPTIONAL TPLS) # Fill forward deps lists #63 tribits_append_forward_dep_packages(${packageName} LIB) @@ -512,7 +517,7 @@ macro(tribits_set_dep_packages packageName testOrLib requiredOrOptional pkgs if (${depPkg} STREQUAL ${packageName}) tribits_abort_on_self_dep("${packageName}" "${inputListType}") endif() - tribits_is_pkg_defined(${depPkg} ${pkgsOrTpls} depPkgIsDefined) + tribits_is_pkg_defined(${depPkg} depPkgIsDefined) if (depPkgIsDefined) list(APPEND ${packageName}_${testOrLib}_DEFINED_DEPENDENCIES ${depPkg}) if ("${requiredOrOptional}" STREQUAL "REQUIRED") @@ -534,18 +539,12 @@ endmacro() # Determine if a (internal or external) package is defined or not # -function(tribits_is_pkg_defined depPkg pkgsOrTpls depPkgIsDefinedOut) +function(tribits_is_pkg_defined depPkg depPkgIsDefinedOut) set(depPkgIsDefined FALSE) - if (pkgsOrTpls STREQUAL "PACKAGES") - if (${depPkg}_SOURCE_DIR) - set(depPkgIsDefined TRUE) - endif() - elseif(pkgsOrTpls STREQUAL "TPLS") - if (${depPkg}_FINDMOD) - set(depPkgIsDefined TRUE) - endif() - else() - message(FATAL_ERROR "Invalid value for pkgsOrTpls = '${pkgsOrTpls}'") + if (${depPkg}_SOURCE_DIR) + set(depPkgIsDefined TRUE) + elseif(${depPkg}_FINDMOD) + set(depPkgIsDefined TRUE) endif() set(${depPkgIsDefinedOut} ${depPkgIsDefined} PARENT_SCOPE) endfunction() diff --git a/cmake/tribits/core/package_arch/TribitsSystemDataStructuresMacrosFunctions.rst b/cmake/tribits/core/package_arch/TribitsSystemDataStructuresMacrosFunctions.rst index faba873cf22b..32e2d10d3118 100644 --- a/cmake/tribits/core/package_arch/TribitsSystemDataStructuresMacrosFunctions.rst +++ b/cmake/tribits/core/package_arch/TribitsSystemDataStructuresMacrosFunctions.rst @@ -334,7 +334,9 @@ the dependencies for each external package/TPL and internal package: This list of all **define direct** extra package test required and optional upstream external package/TPL and internal package dependencies. This list is set regardless if the package ``${PACKAGE_NAME}`` is enabled - or not. + or not. NOTE: This list does **not** contain the items in the list + `${PACKAGE_NAME}_LIB_DEFINED_DEPENDENCIES`_ (but those are implicitly also + required/optional test dependencies as well). .. _${PACKAGE_NAME}_TEST_ENABLED_DEPENDENCIES: @@ -470,7 +472,7 @@ that satisfies the following properties: * Calls ``find_dependency()`` or the equivalent for all upstream packages that it depends on. * Every upstream dependent package ```` has the target - ``::all_libs``. (But a non-fully TriBITS-compliant external + ``::all_libs``. (But a minimally TriBITS-compliant external package need not define this for all of its upstream dependencies.) That means that when calling ``find_package()`` for a fully TriBITS-compliant diff --git a/cmake/tribits/doc/build_ref/TribitsBuildReferenceBody.rst b/cmake/tribits/doc/build_ref/TribitsBuildReferenceBody.rst index 2c5a98291d35..74908d9d24c2 100644 --- a/cmake/tribits/doc/build_ref/TribitsBuildReferenceBody.rst +++ b/cmake/tribits/doc/build_ref/TribitsBuildReferenceBody.rst @@ -1996,7 +1996,7 @@ external packages has several consequences: * The definition of any TriBITS external packages/TPLs that are enabled upstream dependencies from any of these external packages should be defined automatically and will **not** be found again. (But there can be exceptions - for non-fully TriBITS-compliant external packages; see the section + for minimally TriBITS-compliant external packages; see the section "TriBITS-Compliant External Packages" in the "TriBITS Users Guide".) The logic for treating internally defined packages as external packages will @@ -4182,14 +4182,23 @@ match files to exclude, set:: -D _DUMP_CPACK_SOURCE_IGNORE_FILES=ON +Extra directories or files can be excluded from the reduced source tarball by +adding the configure argument:: + + "-DCPACK_SOURCE_IGNORE_FILES=;;..." + +NOTE: The entries in ``CPACK_SOURCE_IGNORE_FILES`` are regexes and **not** +file globs, so be careful when specifying these or more files and directories +will be excluded from the reduced source tarball that intended/desired. + While a set of default CPack source generator types is defined for this project (see the ``CMakeCache.txt`` file), it can be overridden using, for example:: -D _CPACK_SOURCE_GENERATOR="TGZ;TBZ2" -(see CMake documentation to find out the types of supported CPack source -generators on your system). +(See CMake documentation to find out the types of CPack source generators +supported on your system.) NOTE: When configuring from an untarred source tree that has missing packages, one must configure with:: @@ -4219,7 +4228,7 @@ just using the standard ``ctest -D Experimental`` command are: For more details, see `tribits_ctest_driver()`_. To use the ``dashboard`` target, first, configure as normal but add cache vars -for the the build and test parallel levels with:: +for the build and test parallel levels with:: -DCTEST_BUILD_FLAGS=-j4 -DCTEST_PARALLEL_LEVEL=4 diff --git a/cmake/tribits/doc/guides/TribitsGuidesBody.rst b/cmake/tribits/doc/guides/TribitsGuidesBody.rst index 1c86bca77fb0..dbabbce0e924 100644 --- a/cmake/tribits/doc/guides/TribitsGuidesBody.rst +++ b/cmake/tribits/doc/guides/TribitsGuidesBody.rst @@ -1379,7 +1379,7 @@ The variable ``HAVE_SIMPLECXX___INT64`` is set up in the base file ``SimpleCxx/CMakeLists.txt`` (see `/CMakeLists.txt`_ below). For an explanation of ``HAVE_SIMPLECXX_DEBUG``, see `tribits_add_debug_option()`_. For an explanation of ``HAVE_SIMPLECXX_SIMPLETPL``, see `How to add a new -TriBITS external package/TPL dependency`_. For an explanation of +TriBITS Package dependency`_. For an explanation of ``@SIMPLECXX_DEPRECATED_DECLARATIONS@``, see `Setting up support for deprecated code handling`_. @@ -1617,7 +1617,7 @@ are defined before a Package's ``CMakeLists.txt`` file is processed: **NOTE:** The value of this variable also determines the value of the macro define variable name - `HAVE__`_. + `HAVE__`_. .. _${PACKAGE_NAME}_ENABLE_TESTS: @@ -1643,23 +1643,23 @@ The following local **TriBITS Package Optional Dependency Macro Variables** are defined in the top-level project scope before a Package's ``CMakeLists.txt`` file is processed: - .. _HAVE__: + .. _HAVE__: - ``HAVE__`` + ``HAVE__`` Set to ``ON`` if support for optional upstream package ``${OPTIONAL_DEP_PACKAGE}`` is enabled in downstream package ``${PACKAGE_NAME}`` (i.e. `${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}`_ = ``ON``) and is set to ``FALSE`` otherwise. Here, ```` and - ```` are the upper-case names for the packages + ```` are the upper-case names for the packages ``${PACKAGE_NAME}`` and ``${OPTIONAL_DEP_PACKAGE_NAME}``, respectively. For example, if optional support for upstream package ``Triutils`` is enabled in downstream package ``EpetraExt`` in `ReducedMockTrilinos`_, then ``EpetraExt_ENABLE_TriUtils=ON`` and ``HAVE_EPETRAEXT_TRIUTILS=ON``. This variable is meant to be used in:: - #cmakedefine HAVE__ + #cmakedefine HAVE__ in configured header files (e.g. `/cmake/_config.h.in`_). For example, for @@ -2728,13 +2728,13 @@ The requirements for **TriBITS-compliant external packages** are: NOTE: TriBITS-compliant external packages that provide TriBITS-compliant external packages for all of their upstream dependencies are said to be *fully -TriBITS-compliant external packages* while those that don't are said to be -*non-fully TriBITS-compliant external packages*. The TriBITS external -package/TPL system is robust enough to deal with non-fully TriBITS-compliant -external packages. Any TriBITS external packages/TPLs upstream from a -non-fully TriBITS-compliant external package will be found again in the -current TriBITS project. (In these cases, it is up to the user to make sure -that the same upstream packages are found.) +TriBITS-compliant external packages* while those that support the minimal +requirements are said to be *minimally TriBITS-compliant external packages*. +The TriBITS external package/TPL system is robust enough to deal with +minimally TriBITS-compliant external packages. Any TriBITS external +packages/TPLs upstream from a minimally TriBITS-compliant external package +will be found again in the current TriBITS project. (In these cases, it is up +to the user to make sure that the same upstream packages are found.) Example TriBITS Projects @@ -5970,14 +5970,14 @@ links. How to add a new TriBITS Package dependency ----------------------------------------------- +------------------------------------------- It is often the case where one will want to add a new dependency for an -existing `downstream`_ package to an existing `upstream`_ `TriBITS Package`_. -This can either be a required dependency or an optional dependency. Here, we -will refer to the downstream package as ```` with base directory -```` and will refer to the upstream package as -````. +existing `downstream`_ package to an existing `upstream`_ (internal or +external) `TriBITS Package`_. This can either be a required dependency or an +optional dependency. Here, we will refer to the downstream package as +```` with base directory ```` and will refer to the +upstream (internal or external) package as ````. The process for adding a new dependency to an existing upstream package is as follows: @@ -6002,9 +6002,9 @@ as follows: typically a C/C++ processor macro will be added to the package's configured `/cmake/_config.h.in`_ file using the line:: - #cmakedefine HAVE__ + #cmakedefine HAVE__ - (see `HAVE__`_.) + (see `HAVE__`_.) .. _Warning, do not add optional defines for tests/examples to configured header files: @@ -6033,21 +6033,29 @@ as follows: #include "_config.h" - #if HAVE__ + #if HAVE__ # include "_" #endif 4) **For an optional dependency, use CMake if() statements based on - ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}:** When a package + ${PACKAGE_NAME}_ENABLE_:** When a package ``PACKAGE_NAME`` has an optional dependency on an upstream package - ``OPTIONAL_DEP_PACKAGE_NAME`` and needs to put in optional logic in a - CMakeLists.txt file, then the if() statements should use the variable - `${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}`_ and **not** the - variable ``${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}``. For - example, to optionally enable a test that depends on the enable of the - optional upstream dep package, one would use:: - - if (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}) + ```` and needs to put in optional logic in a + ``CMakeLists.txt`` file, then the ``if()`` statements should use the + variable ``${PACKAGE_NAME}_ENABLE_`` and **not** the + variable ``${PROJECT_NAME}_ENABLE_`` or + ``TPL_ENABLE_`` (if ```` is an + external package/TPL). For example, to optionally enable a test that + depends on the enable of the optional upstream dependent package + ````, one would use:: + + tribits_add_test( ... + EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_ENABLE_ + ) + + or:: + + if (${PACKAGE_NAME}_ENABLE_) tribits_add_test( ... ) endif() @@ -6061,100 +6069,13 @@ package library and executable links. See documentation in the functions argument to these functions, for more details. -How to add a new TriBITS external package/TPL dependency --------------------------------------------------------- - -It is often the case where one will want to add a new dependency for an -existing `downstream`_ package to an existing `upstream`_ `TriBITS external -package/TPL`_. This can either be a required dependency or an optional -dependency. Here, we will refer to the downstream package as -```` with base directory ```` and will refer to the -upstream TPL as ````. - -The process for adding a new dependency to an existing upstream TPL is as -follows: - -1) **Add the name of the upstream TPL to the downstream package's - Dependencies.cmake file:** Add ```` to the call of - `tribits_package_define_dependencies()`_ in the downstream package's - `/cmake/Dependencies.cmake`_ file. If this is to be a required - library dependency, then ```` is added to the - ``LIB_REQUIRED_TPLs`` argument. Alternatively, if this is to be an - optional library dependency, then ```` is added to the - ``LIB_OPTIONAL_TPL`` argument. (For example, see the file - ``packages/Teuchos/cmake/Dependencies.cmake`` file in the - `ReducedMockTrilinos`_ project.) If only the test and/or example sources, - and not the package's core library sources, will have the required or - optional dependency, then ```` is added to the arguments - ``TEST_REQUIRED_TPLs`` or ``TEST_OPTIONAL_TPLS``, respectively. - -2) **For an optional dependency, add `HAVE_` preprocessor macro to the - package's configured header file:** If this is an optional dependency, - typically a C/C++ processor macro will be added to the package's configured - `/cmake/_config.h.in`_ file using the line:: - - #cmakedefine HAVE__ - - (see `HAVE__`_.) - - **WARNING:** If this is a test-only and/or example-only dependency then - please do **not** add a ``#cmakedefine`` to the package's core - `/cmake/_config.h.in`_ file. See `Warning, do not - add optional defines for tests/examples to configured header files`_. - -3) **Use the features of the upstream TPL in the source files of the - downstream package sources and/or tests/examples:** Usage of the features - of the upstream package ```` in the downstream package - ```` will typically involve adding ``#include - _`` in the package's C/C++ source (or test/example) - files (or the equivalent in Fortran). If it is an optional dependency, - then these includes will typically be protected using preprocessor ifdefs, - for example, as:: - - #include "_config.h" - - #if HAVE__ - # include "_" - #endif - -4) **For an optional dependency, use CMake if() statements based on - ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}:** When a package - ``PACKAGE_NAME`` has an optional dependency on TPL - ``OPTIONAL_DEP_PACKAGE_NAME`` and needs to put in optional logic in a - CMakeLists.txt file, then the if() statements should use the variable - `${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}`_ and **not** the - variable ``${PROJECT_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}``. For - example, to optionally enable a test that depends on the enable of the - optional TPL, one could use:: - - if (${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME}) - tribits_add_test( ... ) - endif() - - or:: - - tribits_add_test( - EXCLUDE_IF_NOT_TRUE ${PACKAGE_NAME}_ENABLE_${OPTIONAL_DEP_PACKAGE_NAME} - [other args] - ) - - .. ToDo: Find an example to point to in TribitsExampleProject. - -NOTE: TriBITS will automatically add the include directories for the upstream -TPL to the compile lines for the downstream package source builds and will add -the libraries for the upstream TPL to the link lines to the downstream package -library and executable links. See documentation in the functions -`tribits_add_library()`_ and `tribits_add_executable()`_, and the ``DEPLIBS`` -argument to these functions, for more details. - - How to tentatively enable an external package/TPL ------------------------------------------------- A TriBITS package can request the tentative enable of any of its optional -external packagse/TPLs (see `How to add a new TriBITS external package/TPL -dependency`_). This is done by calling `tribits_tpl_tentatively_enable()`_ in -the package's `/cmake/Dependencies.cmake`_ file. For example:: +external packagse/TPLs (see `How to add a new TriBITS Package dependency`_). +This is done by calling `tribits_tpl_tentatively_enable()`_ in the package's +`/cmake/Dependencies.cmake`_ file. For example:: tribits_package_define_dependencies( ... diff --git a/cmake/tribits/examples/ReducedMockTrilinos/extraRepos/DependsOnLAPACK/cmake/Dependencies.cmake b/cmake/tribits/examples/ReducedMockTrilinos/extraRepos/DependsOnLAPACK/cmake/Dependencies.cmake index 3f688dcd49e9..da10035235bd 100644 --- a/cmake/tribits/examples/ReducedMockTrilinos/extraRepos/DependsOnLAPACK/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/ReducedMockTrilinos/extraRepos/DependsOnLAPACK/cmake/Dependencies.cmake @@ -1,3 +1,3 @@ tribits_package_define_dependencies( - LIB_REQUIRED_TPLS LAPACK + LIB_REQUIRED_PACKAGES LAPACK ) diff --git a/cmake/tribits/examples/ReducedMockTrilinos/packages/epetra/cmake/Dependencies.cmake b/cmake/tribits/examples/ReducedMockTrilinos/packages/epetra/cmake/Dependencies.cmake index e3a218cf823d..d08c7ab68282 100644 --- a/cmake/tribits/examples/ReducedMockTrilinos/packages/epetra/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/ReducedMockTrilinos/packages/epetra/cmake/Dependencies.cmake @@ -1,4 +1,4 @@ tribits_package_define_dependencies( - LIB_REQUIRED_TPLS BLAS LAPACK - LIB_OPTIONAL_TPLS MPI + LIB_REQUIRED_PACKAGES BLAS LAPACK + LIB_OPTIONAL_PACKAGES MPI ) diff --git a/cmake/tribits/examples/ReducedMockTrilinos/packages/epetraext/cmake/Dependencies.cmake b/cmake/tribits/examples/ReducedMockTrilinos/packages/epetraext/cmake/Dependencies.cmake index 1cd83d35ef6b..d0b518696b6d 100644 --- a/cmake/tribits/examples/ReducedMockTrilinos/packages/epetraext/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/ReducedMockTrilinos/packages/epetraext/cmake/Dependencies.cmake @@ -1,15 +1,14 @@ if (SHOW_TEST_REQUIRED_PACKAGE_DEP) - set(TEST_REQUIRED_PACKAGES_ARGS TEST_REQUIRED_PACKAGES Triutils) + set(TEST_REQUIRED_PACKAGES Triutils) endif() if (SHOW_TEST_REQUIRED_TPL_DEP) - set(TEST_REQUIRED_TPLS_ARGS TEST_REQUIRED_TPLS AMD) + set(TEST_REQUIRED_PACKAGES ${TEST_REQUIRED_PACKAGES} AMD) endif() tribits_package_define_dependencies( LIB_REQUIRED_PACKAGES Teuchos Epetra LIB_OPTIONAL_PACKAGES Triutils - LIB_OPTIONAL_TPLS UMFPACK AMD PETSC - ${TEST_REQUIRED_PACKAGES_ARGS} - ${TEST_REQUIRED_TPLS_ARGS} + LIB_OPTIONAL_PACKAGES UMFPACK AMD PETSC + TEST_REQUIRED_PACKAGES ${TEST_REQUIRED_PACKAGES} ) diff --git a/cmake/tribits/examples/ReducedMockTrilinos/packages/teuchos/cmake/Dependencies.cmake b/cmake/tribits/examples/ReducedMockTrilinos/packages/teuchos/cmake/Dependencies.cmake index 1d5eb60933c2..6e5f9d4aa3dd 100644 --- a/cmake/tribits/examples/ReducedMockTrilinos/packages/teuchos/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/ReducedMockTrilinos/packages/teuchos/cmake/Dependencies.cmake @@ -1,4 +1,4 @@ tribits_package_define_dependencies( - LIB_REQUIRED_TPLS BLAS LAPACK - LIB_OPTIONAL_TPLS Boost MPI + LIB_REQUIRED_PACKAGES BLAS LAPACK + LIB_OPTIONAL_PACKAGES Boost MPI ) diff --git a/cmake/tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/Dependencies.cmake b/cmake/tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/Dependencies.cmake index 13461825aff0..4ee6c7ee906a 100644 --- a/cmake/tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/Dependencies.cmake @@ -1,5 +1,5 @@ tribits_package_define_dependencies( - LIB_REQUIRED_TPLS HeaderOnlyTpl - LIB_OPTIONAL_TPLS SimpleTpl MPI + LIB_REQUIRED_PACKAGES HeaderOnlyTpl + LIB_OPTIONAL_PACKAGES SimpleTpl MPI REGRESSION_EMAIL_LIST simplecxx-regressions@someurl.none ) diff --git a/cmake/tribits/examples/TribitsExampleProject2/packages/package1/cmake/Dependencies.cmake b/cmake/tribits/examples/TribitsExampleProject2/packages/package1/cmake/Dependencies.cmake index 64ccf196ee88..5383950e6ab6 100644 --- a/cmake/tribits/examples/TribitsExampleProject2/packages/package1/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/TribitsExampleProject2/packages/package1/cmake/Dependencies.cmake @@ -1,3 +1,3 @@ tribits_package_define_dependencies( - LIB_REQUIRED_TPLS Tpl1 + LIB_REQUIRED_PACKAGES Tpl1 ) diff --git a/cmake/tribits/examples/TribitsExampleProject2/packages/package2/cmake/Dependencies.cmake b/cmake/tribits/examples/TribitsExampleProject2/packages/package2/cmake/Dependencies.cmake index 46c260a2642a..e299aef0d7a6 100644 --- a/cmake/tribits/examples/TribitsExampleProject2/packages/package2/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/TribitsExampleProject2/packages/package2/cmake/Dependencies.cmake @@ -1,4 +1,4 @@ tribits_package_define_dependencies( LIB_REQUIRED_PACKAGES Package1 - LIB_OPTIONAL_TPLS Tpl3 + LIB_OPTIONAL_PACKAGES Tpl3 ) diff --git a/cmake/tribits/examples/TribitsExampleProject2/packages/package3/cmake/Dependencies.cmake b/cmake/tribits/examples/TribitsExampleProject2/packages/package3/cmake/Dependencies.cmake index 6e9a0e1e47b5..b2c5eec2621d 100644 --- a/cmake/tribits/examples/TribitsExampleProject2/packages/package3/cmake/Dependencies.cmake +++ b/cmake/tribits/examples/TribitsExampleProject2/packages/package3/cmake/Dependencies.cmake @@ -1,6 +1,4 @@ tribits_package_define_dependencies( - LIB_REQUIRED_PACKAGES Package1 - LIB_OPTIONAL_PACKAGES Package2 - LIB_REQUIRED_TPLS Tpl2 - LIB_OPTIONAL_TPLS Tpl4 + LIB_REQUIRED_PACKAGES Package1 Tpl2 + LIB_OPTIONAL_PACKAGES Package2 Tpl4 )