Skip to content

Commit

Permalink
Merge branch 'tribits_github_snapshot' into tribits-299-modern-cmake-…
Browse files Browse the repository at this point in the history
…targets-1

I resolved the confict in:

* cmake/tribits/core/package_arch/TribitsConstants.cmake

by going with what comes from the TriBITS GitHub snapshot (with the lower-case
set()).
  • Loading branch information
bartlettroscoe committed Nov 2, 2021
2 parents b6837af + 23c2a57 commit 822411b
Show file tree
Hide file tree
Showing 56 changed files with 1,969 additions and 747 deletions.
20 changes: 20 additions & 0 deletions cmake/tribits/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
Release Notes for TriBITS
----------------------------------------

2021/10/11:

(*) MAJOR: The `<Package>Config.cmake` for each enabled package generated in
the build directory tree have been moved from
`<buildDir>/packages/<packageDir>/` to
`<buildDir>/cmake_packages/<PackageName>/`. This makes it easy for
`find_package(<PackageName>)` to fine these files by simply adding the
directory ``<buildDir>/cmake_packages` to `CMAKE_PREFIX_PATH` and then
`<Package>Config.cmake` for any enabled package will be found
automatically found by CMake.

2021/09/13:

(*) MAJOR: Support for generation and installation of Makefile.export.* files
has been removed along with the cache variable
<Project>_ENABLE_EXPORT_MAKEFILES. This is to allow the refactoring of
TriBITS to use modern CMake targets that propagate all information and
removing complex dependency tracking inforamtion from TriBITS (see
TriBITSPub/TriBITS#63 and TriBITSPub/TriBITS#299).

2021/06/17:

(*) MINOR: Added tool tribits/python_utils/lower_case_cmake.py and driver
Expand Down
39 changes: 38 additions & 1 deletion cmake/tribits/TriBITS.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
# @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

# Top-level include file that pulls in TriBITS so it can be used by a project.
# A Project's top-level CMakeLists.cmake file just does:
#
Expand All @@ -7,7 +45,6 @@
# and then they can call:
#
# tribits_project()
#

if (${PROJECT_NAME}_TRIBITS_DIR)
set(TRIBITS_BASE_DIR_LOCAL "${${PROJECT_NAME}_TRIBITS_DIR}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# 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.
#
Expand Down Expand Up @@ -46,7 +45,7 @@
#
##############################################################################

${DEFINE_CMAKE_CURRENT_LIST_DIR_CODE_SNIPPET}
include_guard()

## ---------------------------------------------------------------------------
## Compilers used by ${PROJECT_NAME}/${PACKAGE_NAME} build
Expand Down
110 changes: 0 additions & 110 deletions cmake/tribits/core/installation/TribitsPackageConfigTemplate.export.in

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@
#
##############################################################################

#
# Ensure CMAKE_CURRENT_LIST_DIR is usable.
#
${DEFINE_CMAKE_CURRENT_LIST_DIR_CODE_SNIPPET}
include_guard()

## ---------------------------------------------------------------------------
## Compilers used by ${PROJECT_NAME} build
Expand Down Expand Up @@ -106,7 +103,7 @@ endif()
# Initialize ${PROJECT_NAME}_FOUND with true, and set it to FALSE if any of
# the required components wasn't found.
set(${PROJECT_NAME}_FOUND TRUE)
foreach(comp ${PDOLLAR}{COMPONENTS_LIST})
foreach (comp IN ITEMS ${PDOLLAR}{COMPONENTS_LIST})
set(
INCLUDE_FILE
${PDOLLAR}{CMAKE_CURRENT_LIST_DIR}/../${PDOLLAR}{comp}/${PDOLLAR}{comp}Config.cmake
Expand Down Expand Up @@ -198,5 +195,30 @@ set(${PROJECT_NAME}_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LI
## The packages enabled for this project
set(${PROJECT_NAME}_PACKAGE_LIST "${FULL_PACKAGE_SET}")

## The selected packages for this project
set(${PROJECT_NAME}_SELECTED_PACKAGE_LIST "${PDOLLAR}{COMPONENTS_LIST}")

## The TPLs enabled for this project
set(${PROJECT_NAME}_TPL_LIST "${FULL_TPL_SET}")

## ---------------------------------------------------------------------------
## Modern CMake (IMPORTED) targets
## ---------------------------------------------------------------------------

# ${PROJECT_NAME}::all_libs (Does *not* depend on COMPONENTS)
set(${PROJECT_NAME}_ALL_PACKAGES_TARGETS)
foreach (pkg IN ITEMS ${FULL_PACKAGE_SET})
list(APPEND ${PROJECT_NAME}_ALL_PACKAGES_TARGETS ${PDOLLAR}{pkg}::all_libs)
endforeach()
add_library(${PROJECT_NAME}::all_libs IMPORTED INTERFACE GLOBAL)
target_link_libraries(${PROJECT_NAME}::all_libs
INTERFACE ${PDOLLAR}{${PROJECT_NAME}_ALL_PACKAGES_TARGETS} )

# ${PROJECT_NAME}::all_selected_libs (Depend on COMPONENTS)
set(${PROJECT_NAME}_ALL_SELECTED_PACKAGES_TARGETS)
foreach (pkg IN ITEMS ${PDOLLAR}{COMPONENTS_LIST})
list(APPEND ${PROJECT_NAME}_ALL_SELECTED_PACKAGES_TARGETS ${PDOLLAR}{pkg}::all_libs)
endforeach()
add_library(${PROJECT_NAME}::all_selected_libs IMPORTED INTERFACE GLOBAL)
target_link_libraries(${PROJECT_NAME}::all_selected_libs
INTERFACE ${PDOLLAR}{${PROJECT_NAME}_ALL_SELECTED_PACKAGES_TARGETS} )

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
set(tribits_install_src
"${${PROJECT_NAME}_TRIBITS_DIR}/${TRIBITS_CMAKE_INSTALLATION_FILES_DIR}")

if((${PROJECT_NAME}_ENABLE_INSTALL_CMAKE_CONFIG_FILES
OR ${PROJECT_NAME}_ENABLE_EXPORT_MAKEFILES)
AND NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING
if ( ${PROJECT_NAME}_ENABLE_INSTALL_CMAKE_CONFIG_FILES
AND NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING
)

include(TribitsWriteClientExportFiles)
Expand Down

0 comments on commit 822411b

Please sign in to comment.