Skip to content

Commit

Permalink
Merge 'trilinos/Trilinos:develop' (23f6c90) into 'tcad-charon/Trilino…
Browse files Browse the repository at this point in the history
…s:develop' (bd0856f).

* trilinos-develop:
  changed rocblas and rocsparse order in TPLsList.cmake
  Automatic snapshot commit from tribits at 014a1538
  Added ROCBLAS and ROCSPARSE Dependendies for Kernels package
  • Loading branch information
Charonops Jenkins Pipeline committed Mar 31, 2023
2 parents bd0856f + 23f6c90 commit 28a7b37
Show file tree
Hide file tree
Showing 71 changed files with 2,658 additions and 1,843 deletions.
2 changes: 2 additions & 0 deletions TPLsList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ TRIBITS_REPOSITORY_DEFINE_TPLS(
CUSPARSE "cmake/TPLs/" PT
Thrust "cmake/TPLs/" ST
Cusp "cmake/TPLs/" ST
ROCBLAS "cmake/TPLs/" PT
ROCSPARSE "cmake/TPLs/" PT
TBB "cmake/TPLs/" EX
Pthread "cmake/TPLs/" PT
HWLOC "cmake/TPLs/" ST
Expand Down
63 changes: 63 additions & 0 deletions cmake/TPLs/FindTPLROCBLAS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @HEADER
# ************************************************************************
#
# Trilinos: An Object-Oriented Solver Framework
# Copyright (2001) Sandia Corporation
#
#
# Copyright (2001) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000, there is a non-exclusive license for use of this
# work by or on behalf of the U.S. Government. Export of this program
# may require a license from the United States Government.
#
# 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.
#
# NOTICE: The United States Government is granted for itself and others
# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
# license in this data to reproduce, prepare derivative works, and
# perform publicly and display publicly. Beginning five (5) years from
# July 25, 2001, the United States Government is granted for itself and
# others acting on its behalf a paid-up, nonexclusive, irrevocable
# worldwide license in this data to reproduce, prepare derivative works,
# distribute copies to the public, perform publicly and display
# publicly, and to permit others to do so.
#
# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT
# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES
# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR
# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY
# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#
# ************************************************************************
# @HEADER

find_package(ROCBLAS)

if(ROCBLAS_FOUND)
tribits_extpkg_create_imported_all_libs_target_and_config_file( ROCBLAS
INNER_FIND_PACKAGE_NAME ROCBLAS
IMPORTED_TARGETS_FOR_ALL_LIBS roc::rocblas )
endif()

63 changes: 63 additions & 0 deletions cmake/TPLs/FindTPLROCSPARSE.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# @HEADER
# ************************************************************************
#
# Trilinos: An Object-Oriented Solver Framework
# Copyright (2001) Sandia Corporation
#
#
# Copyright (2001) Sandia Corporation. Under the terms of Contract
# DE-AC04-94AL85000, there is a non-exclusive license for use of this
# work by or on behalf of the U.S. Government. Export of this program
# may require a license from the United States Government.
#
# 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.
#
# NOTICE: The United States Government is granted for itself and others
# acting on its behalf a paid-up, nonexclusive, irrevocable worldwide
# license in this data to reproduce, prepare derivative works, and
# perform publicly and display publicly. Beginning five (5) years from
# July 25, 2001, the United States Government is granted for itself and
# others acting on its behalf a paid-up, nonexclusive, irrevocable
# worldwide license in this data to reproduce, prepare derivative works,
# distribute copies to the public, perform publicly and display
# publicly, and to permit others to do so.
#
# NEITHER THE UNITED STATES GOVERNMENT, NOR THE UNITED STATES DEPARTMENT
# OF ENERGY, NOR SANDIA CORPORATION, NOR ANY OF THEIR EMPLOYEES, MAKES
# ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR
# RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY
# INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS
# THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#
# ************************************************************************
# @HEADER

find_package(ROCSPARSE)

if(ROCSPARSE_FOUND)
tribits_extpkg_create_imported_all_libs_target_and_config_file( ROCSPARSE
INNER_FIND_PACKAGE_NAME ROCSPARSE
IMPORTED_TARGETS_FOR_ALL_LIBS roc::rocsparse )
endif()

55 changes: 55 additions & 0 deletions cmake/tribits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@
ChangeLog for TriBITS
----------------------------------------

## 2023-02-24:

* **Changed:** Upgraded minimum required CMake version from 3.17 to 3.23.
Existing TriBITS projects that have already upgraded to require CMake 3.23+
should not notice any major changes due to this change.

## 2023-02-21:

* **Added:** Added support for pre-installed internal packages treated as
external packages. Now, any set of internally defined TriBITS packages for
a TriBITS project can be pre-built and pre-installed and the remaining
packages in the TriBITS project can be configured to point to those by
setting `-D TPL_ENABLE_<Package>=ON`. This allows great flexibility in how
a TriBITS project's packages can be and built, installed, and deployed.
This technically implements "Use Case 3: Configure/build pointing to a
subset of already installed TriBITS packages in same repo" in [TriBITS
#63](https://github.com/TriBITSPub/TriBITS/issues/63). See the section
"Building against pre-installed packages" in the updated build reference
documentation for details.

* **Fixed:** Setting `-D<Project>_ENABLE_<TplName>=ON` for an external
package/TPL `<TplName>` will not correctly enable and process the TPL.

## 2022-12-07:

* **Changed:** Setting `-D<Project>_ENABLE_<TplName>=ON` now triggers the
enable an external package/TPL `<TplName>` similar to the way that
`-DTPL_ENABLE_<TplName>` has always done. This is technically a change in
backward compatibility because setting `<Project>_ENABLE_<TplName>=ON` for
an external package/TPL used to be ignored. This change was done as part of
a general refactoring to unify the handling of internal and external
packages and is a side effect of that refactoring (see [TriBITS
#63](https://github.com/TriBITSPub/TriBITS/issues/63)). (Initially, setting
`-D<Project>_ENABLE_<TplName>=ON` resulted in a failed configure because the
refactoring was not complete for the handling of external packages/TPL. But
this was fixed in a latter update.)

## 2023-10-25:

* **Added:** New option `<Project>_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES`
skips the install of the project-level `<Project>Config.cmake` file. The
default value is ``FALSE`` so as to maintain backward compatibility. (The
project can change the default.)

* **Changed:** External packages/TPLs are now processed at the base project
scope level. This allows simple `set()` statements in package module files
or config files included by `find_package()` to have project-level scope for
the entire TriBITS project. This is more similar to how a raw CMake project
would usually behave that calls `find_package()` in the base
`CMakeLists.txt` file. Before, calls to `find_package()` were wrapped in a
CMake `function()` called from the base project directory scope. So while
IMPORTED targets created from a `find_package()` command where visible at
the base directory project-level scope, local variables were not. With this
change, now they are.

## 2023-01-10:

* **Added:** Added back support for deprecated variable
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/ci_support/TribitsDumpDepsXmlScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# -P <tribitsDir>/ci_support/TribitsDumpDepsXmlScript.cmake
#

cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.23.0 FATAL_ERROR)

# A) Echo input options (must be specified with -D arguments to CMake command)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ function(tribits_write_deps_to_xml_string packageName libOrTest requiredOrOpti

set(listType ${libOrTest}_${requiredOrOptional}_DEP_${packagesOrTpls})
message("")
print_var(listType)

tribits_get_legacy_package_deps_sublist(${packageName} ${libOrTest}
${requiredOrOptional} ${packagesOrTpls} legacyPackageDepsList)
Expand Down
2 changes: 1 addition & 1 deletion cmake/tribits/core/config_tests/fmangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# ************************************************************************
# @HEADER

cmake_minimum_required(VERSION 3.17)
cmake_minimum_required(VERSION 3.23)
project(fmangle C Fortran)
add_definitions(${COMMON_DEFS})
set(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ set(tribits_install_src
"${${PROJECT_NAME}_TRIBITS_DIR}/${TRIBITS_CMAKE_INSTALLATION_FILES_DIR}")

if ( ${PROJECT_NAME}_ENABLE_INSTALL_CMAKE_CONFIG_FILES
AND NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING
AND (NOT ${PROJECT_NAME}_ENABLE_INSTALLATION_TESTING)
AND (NOT ${PROJECT_NAME}_SKIP_INSTALL_PROJECT_CMAKE_CONFIG_FILES)
)

include(TribitsWriteClientExportFiles)
include(TribitsProjectWriteConfigFile)

tribits_write_project_client_export_files()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ include(PrintVar)
# ``${PROJECT_NAME}_TRIBITS_DIR`` (pointing to the TriBITS location). For example,
# a valid project can be a simple as::
#
# cmake_minimum_required(VERSION 3.17.0)
# cmake_minimum_required(VERSION 3.23.0)
# set(PROJECT_NAME TAATDriver)
# project(${PROJECT_NAME} NONE)
# set(${PROJECT_NAME}_TRACE_ADD_TEST TRUE)
Expand Down
Loading

0 comments on commit 28a7b37

Please sign in to comment.