130 changes: 102 additions & 28 deletions AMD/CMakeLists.txt
Expand Up @@ -10,12 +10,12 @@
# get the version
#-------------------------------------------------------------------------------

cmake_minimum_required ( VERSION 3.19 )
cmake_minimum_required ( VERSION 3.20 )

set ( AMD_DATE "June 16, 2023" )
set ( AMD_DATE "Sept 8, 2023" )
set ( AMD_VERSION_MAJOR 3 )
set ( AMD_VERSION_MINOR 0 )
set ( AMD_VERSION_SUB 4 )
set ( AMD_VERSION_MINOR 2 )
set ( AMD_VERSION_SUB 0 )

message ( STATUS "Building AMD version: v"
${AMD_VERSION_MAJOR}.
Expand All @@ -27,7 +27,6 @@ message ( STATUS "Building AMD version: v"
#-------------------------------------------------------------------------------

set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules
${CMAKE_SOURCE_DIR}/../SuiteSparse_config/cmake_modules )

include ( SuiteSparsePolicy )
Expand Down Expand Up @@ -57,7 +56,11 @@ endif ( )
# find library dependencies
#-------------------------------------------------------------------------------

find_package ( SuiteSparse_config 7.1.0 REQUIRED )
find_package ( SuiteSparse_config 7.2.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.2.0 REQUIRED )
endif ( )

#-------------------------------------------------------------------------------
# configure files
Expand All @@ -72,7 +75,7 @@ configure_file ( "Config/amd_version.tex.in" "${PROJECT_SOURCE_DIR}/Doc/amd_vers
# include directories
#-------------------------------------------------------------------------------

include_directories ( Source Include ${SUITESPARSE_CONFIG_INCLUDE_DIR} )
include_directories ( Source Include )

#-------------------------------------------------------------------------------
# dynamic amd library properties
Expand All @@ -84,69 +87,140 @@ else ( )
file ( GLOB AMD_SOURCES "Source/*.c" )
endif ( )

add_library ( amd SHARED ${AMD_SOURCES} )
set_target_properties ( amd PROPERTIES
add_library ( AMD SHARED ${AMD_SOURCES} )
set_target_properties ( AMD PROPERTIES
VERSION ${AMD_VERSION_MAJOR}.${AMD_VERSION_MINOR}.${AMD_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME amd
SOVERSION ${AMD_VERSION_MAJOR}
PUBLIC_HEADER "Include/amd.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON )

target_include_directories ( AMD
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

#-------------------------------------------------------------------------------
# static amd library properties
#-------------------------------------------------------------------------------

if ( NOT NSTATIC )
add_library ( amd_static STATIC ${AMD_SOURCES} )
set_target_properties ( amd_static PROPERTIES
add_library ( AMD_static STATIC ${AMD_SOURCES} )
set_target_properties ( AMD_static PROPERTIES
VERSION ${AMD_VERSION_MAJOR}.${AMD_VERSION_MINOR}.${AMD_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME amd
SOVERSION ${AMD_VERSION_MAJOR} )

if ( MSVC )
set_target_properties ( amd_static PROPERTIES
set_target_properties ( AMD_static PROPERTIES
OUTPUT_NAME amd_static )
endif ( )

target_include_directories ( AMD_static
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

endif ( )

#-------------------------------------------------------------------------------
# add the library dependencies
#-------------------------------------------------------------------------------

# suitesparseconfig:
target_link_libraries ( amd PRIVATE ${SUITESPARSE_CONFIG_LIBRARIES} )
# SuiteSparseConfig:
target_link_libraries ( AMD PRIVATE SuiteSparse::SuiteSparseConfig )
target_include_directories ( AMD PUBLIC
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
if ( NOT NSTATIC )
target_link_libraries ( amd_static PUBLIC ${SUITESPARSE_CONFIG_STATIC} )
if ( TARGET SuiteSparse::SuiteSparseConfig_static )
target_link_libraries ( AMD_static PUBLIC SuiteSparse::SuiteSparseConfig_static )
else ( )
target_link_libraries ( AMD_static PUBLIC SuiteSparse::SuiteSparseConfig )
endif ( )
endif ( )

# libm:
if ( NOT WIN32 )
target_link_libraries ( amd PRIVATE m )
target_link_libraries ( AMD PRIVATE m )
if ( NOT NSTATIC )
target_link_libraries ( amd_static PUBLIC m )
set ( AMD_STATIC_LIBS "${AMD_STATIC_LIBS} -lm" )
target_link_libraries ( AMD_static PUBLIC m )
endif ( )
endif ( )

#-------------------------------------------------------------------------------
# AMD installation location
#-------------------------------------------------------------------------------

install ( TARGETS amd
include ( CMakePackageConfigHelpers )

install ( TARGETS AMD
EXPORT AMDTargets
LIBRARY DESTINATION ${SUITESPARSE_LIBDIR}
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR}
RUNTIME DESTINATION ${SUITESPARSE_BINDIR}
PUBLIC_HEADER DESTINATION ${SUITESPARSE_INCLUDEDIR} )
install ( FILES ${CMAKE_SOURCE_DIR}/cmake_modules/FindAMD.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/SuiteSparse
COMPONENT Development )
if ( NOT NSTATIC )
install ( TARGETS amd_static
install ( TARGETS AMD_static
EXPORT AMDTargets
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} )
endif ( )

# create (temporary) export target file during build
export ( EXPORT AMDTargets
NAMESPACE SuiteSparse::
FILE ${CMAKE_CURRENT_BINARY_DIR}/AMDTargets.cmake )

# install export target, config and version files for find_package
install ( EXPORT AMDTargets
NAMESPACE SuiteSparse::
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/AMD )

configure_package_config_file (
Config/AMDConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/AMDConfig.cmake
INSTALL_DESTINATION ${SUITESPARSE_LIBDIR}/cmake/AMD )

write_basic_package_version_file (
${CMAKE_CURRENT_BINARY_DIR}/AMDConfigVersion.cmake
COMPATIBILITY SameMajorVersion )

install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/AMDConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/AMDConfigVersion.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/AMD )

#-------------------------------------------------------------------------------
# create pkg-config file
#-------------------------------------------------------------------------------

if ( NOT MSVC )
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE )
if (SUITESPARSE_LIBDIR_IS_ABSOLUTE)
set ( libdir "${SUITESPARSE_LIBDIR}")
else ( )
set ( libdir "\${exec_prefix}/${SUITESPARSE_LIBDIR}")
endif ( )
cmake_path ( IS_ABSOLUTE SUITESPARSE_INCLUDEDIR SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE )
if (SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE)
set ( includedir "${SUITESPARSE_INCLUDEDIR}")
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
configure_file (
Config/AMD.pc.in
AMD.pc
@ONLY
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/AMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
endif ( )

#-------------------------------------------------------------------------------
# Demo library and programs
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -174,13 +248,13 @@ if ( DEMO )
endif ( )

# Libraries required for Demo programs
target_link_libraries ( amd_demo PUBLIC amd )
target_link_libraries ( amd_l_demo PUBLIC amd )
target_link_libraries ( amd_demo2 PUBLIC amd )
target_link_libraries ( amd_simple PUBLIC amd )
target_link_libraries ( amd_demo PUBLIC AMD )
target_link_libraries ( amd_l_demo PUBLIC AMD )
target_link_libraries ( amd_demo2 PUBLIC AMD )
target_link_libraries ( amd_simple PUBLIC AMD )
if ( NOT NFORTRAN )
target_link_libraries ( amd_f77demo PUBLIC amd )
target_link_libraries ( amd_f77simple PUBLIC amd )
target_link_libraries ( amd_f77demo PUBLIC AMD )
target_link_libraries ( amd_f77simple PUBLIC AMD )
endif ( )

else ( )
Expand Down
17 changes: 17 additions & 0 deletions AMD/Config/AMD.pc.in
@@ -0,0 +1,17 @@
# AMD, Copyright (c) 1996-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: BSD-3-Clause

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: AMD
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Routines for permuting sparse matrices prior to factorization in SuiteSparse
Version: @AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@
Requires.private: SuiteSparse_config
Libs: -L${libdir} -lamd
Libs.private: @AMD_STATIC_LIBS@
Cflags: -I${includedir}
121 changes: 121 additions & 0 deletions AMD/Config/AMDConfig.cmake.in
@@ -0,0 +1,121 @@
#-------------------------------------------------------------------------------
# SuiteSparse/AMD/cmake_modules/AMDConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# AMDConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the AMD include file and compiled library.
# The following targets are defined:
# SuiteSparse::AMD - for the shared library (if available)
# SuiteSparse::AMD_static - for the static library (if available)

# For backward compatibility the following variables are set:

# AMD_INCLUDE_DIR - where to find amd.h
# AMD_LIBRARY - dynamic AMD library
# AMD_STATIC - static AMD library
# AMD_LIBRARIES - libraries when using AMD
# AMD_FOUND - true if AMD found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( AMD_DATE "@AMD_DATE@" )
set ( AMD_VERSION_MAJOR @AMD_VERSION_MAJOR@ )
set ( AMD_VERSION_MINOR @AMD_VERSION_MINOR@ )
set ( AMD_VERSION_PATCH @AMD_VERSION_SUB@ )
set ( AMD_VERSION "@AMD_VERSION_MAJOR@.@AMD_VERSION_MINOR@.@AMD_VERSION_SUB@" )

include ( ${CMAKE_CURRENT_LIST_DIR}/AMDTargets.cmake )

# The following is only for backward compatibility with FindAMD.

set ( _target_shared SuiteSparse::AMD )
set ( _target_static SuiteSparse::AMD_static )
set ( _var_prefix "AMD" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( AMD_LIBRARIES ${AMD_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( AMD_INCLUDE_DIR ${AMD_INCLUDE_DIR} )
suitesparse_check_exist ( AMD_LIBRARY ${AMD_LIBRARY} )

message ( STATUS "AMD version: ${AMD_VERSION}" )
message ( STATUS "AMD include: ${AMD_INCLUDE_DIR}")
message ( STATUS "AMD library: ${AMD_LIBRARY}")
message ( STATUS "AMD static: ${AMD_STATIC}")
6 changes: 3 additions & 3 deletions AMD/Demo/amd_demo.out
@@ -1,7 +1,7 @@
AMD version 3.0.4, date: June 16, 2023
AMD version 3.2.0, date: Sept 8, 2023
AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

AMD version 3.0.4, June 16, 2023: approximate minimum degree ordering
AMD version 3.2.0, Sept 8, 2023: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_order: 0 (should be 0)

AMD version 3.0.4, June 16, 2023, results:
AMD version 3.2.0, Sept 8, 2023, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
4 changes: 2 additions & 2 deletions AMD/Demo/amd_demo2.out
@@ -1,7 +1,7 @@
AMD demo, with a jumbled version of the 24-by-24
Harwell/Boeing matrix, can_24:

AMD version 3.0.4, June 16, 2023: approximate minimum degree ordering
AMD version 3.2.0, Sept 8, 2023: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -144,7 +144,7 @@ Plot of symmetric matrix to be ordered by amd_order:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_order: 1 (should be 1)

AMD version 3.0.4, June 16, 2023, results:
AMD version 3.2.0, Sept 8, 2023, results:
status: OK, but jumbled
n, dimension of A: 24
nz, number of nonzeros in A: 102
Expand Down
6 changes: 3 additions & 3 deletions AMD/Demo/amd_l_demo.out
@@ -1,7 +1,7 @@
AMD version 3.0.4, date: June 16, 2023
AMD version 3.2.0, date: Sept 8, 2023
AMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

AMD version 3.0.4, June 16, 2023: approximate minimum degree ordering
AMD version 3.2.0, Sept 8, 2023: approximate minimum degree ordering
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from amd_l_order: 0 (should be 0)

AMD version 3.0.4, June 16, 2023, results:
AMD version 3.2.0, Sept 8, 2023, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
Binary file modified AMD/Doc/AMD_UserGuide.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions AMD/Doc/ChangeLog
@@ -1,3 +1,7 @@
Sept 8, 2023: version 3.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel

June 16, 2023: version 3.0.4

* cmake build system updates: update by Markus Muetzel
Expand Down
2 changes: 1 addition & 1 deletion AMD/Doc/amd_version.tex
@@ -1,2 +1,2 @@
% version of SuiteSparse/AMD
\date{VERSION 3.0.4, June 16, 2023}
\date{VERSION 3.2.0, Sept 8, 2023}
6 changes: 3 additions & 3 deletions AMD/Include/amd.h
Expand Up @@ -374,10 +374,10 @@ void amd_l_info (double Info [ ]) ;
* Versions 1.1 and earlier of AMD do not include a #define'd version number.
*/

#define AMD_DATE "June 16, 2023"
#define AMD_DATE "Sept 8, 2023"
#define AMD_MAIN_VERSION 3
#define AMD_SUB_VERSION 0
#define AMD_SUBSUB_VERSION 4
#define AMD_SUB_VERSION 2
#define AMD_SUBSUB_VERSION 0

#define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
#define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION)
Expand Down
129 changes: 0 additions & 129 deletions AMD/cmake_modules/FindAMD.cmake

This file was deleted.

118 changes: 96 additions & 22 deletions BTF/CMakeLists.txt
Expand Up @@ -10,12 +10,12 @@
# get the version
#-------------------------------------------------------------------------------

cmake_minimum_required ( VERSION 3.19 )
cmake_minimum_required ( VERSION 3.20 )

set ( BTF_DATE "June 16, 2023" )
set ( BTF_DATE "Sept 8, 2023" )
set ( BTF_VERSION_MAJOR 2 )
set ( BTF_VERSION_MINOR 0 )
set ( BTF_VERSION_SUB 4 )
set ( BTF_VERSION_MINOR 2 )
set ( BTF_VERSION_SUB 0 )

message ( STATUS "Building BTF version: v"
${BTF_VERSION_MAJOR}.
Expand All @@ -27,7 +27,6 @@ message ( STATUS "Building BTF version: v"
#-------------------------------------------------------------------------------

set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules
${CMAKE_SOURCE_DIR}/../SuiteSparse_config/cmake_modules )

include ( SuiteSparsePolicy )
Expand All @@ -44,7 +43,11 @@ project ( btf
# find library dependencies
#-------------------------------------------------------------------------------

find_package ( SuiteSparse_config 7.1.0 REQUIRED )
find_package ( SuiteSparse_config 7.2.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.2.0 REQUIRED )
endif ( )

#-------------------------------------------------------------------------------
# configure files
Expand All @@ -57,79 +60,150 @@ configure_file ( "Config/btf.h.in" "${PROJECT_SOURCE_DIR}/Include/btf.h"
# include directories
#-------------------------------------------------------------------------------

include_directories ( Source Include ${SUITESPARSE_CONFIG_INCLUDE_DIR} )
include_directories ( Source Include )

#-------------------------------------------------------------------------------
# dynamic btf library properties
#-------------------------------------------------------------------------------

file ( GLOB BTF_SOURCES "Source/*.c" )

add_library ( btf SHARED ${BTF_SOURCES} )
add_library ( BTF SHARED ${BTF_SOURCES} )

set_target_properties ( btf PROPERTIES
set_target_properties ( BTF PROPERTIES
VERSION ${BTF_VERSION_MAJOR}.${BTF_VERSION_MINOR}.${BTF_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME btf
SOVERSION ${BTF_VERSION_MAJOR}
PUBLIC_HEADER "Include/btf.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON)

target_include_directories ( BTF
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

#-------------------------------------------------------------------------------
# static btf library properties
#-------------------------------------------------------------------------------

if ( NOT NSTATIC )
add_library ( btf_static STATIC ${BTF_SOURCES} )
add_library ( BTF_static STATIC ${BTF_SOURCES} )

set_target_properties ( btf_static PROPERTIES
set_target_properties ( BTF_static PROPERTIES
VERSION ${BTF_VERSION_MAJOR}.${BTF_VERSION_MINOR}.${BTF_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME btf
SOVERSION ${BTF_VERSION_MAJOR} )

if ( MSVC )
set_target_properties ( btf_static PROPERTIES
set_target_properties ( BTF_static PROPERTIES
OUTPUT_NAME btf_static )
endif ( )

target_include_directories ( BTF_static
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

endif ( )

#-------------------------------------------------------------------------------
# add the library dependencies
#-------------------------------------------------------------------------------

# suitesparseconfig:
target_link_libraries ( btf PRIVATE ${SUITESPARSE_CONFIG_LIBRARIES} )
# SuiteSparseConfig:
target_link_libraries ( BTF PRIVATE SuiteSparse::SuiteSparseConfig )
target_include_directories ( BTF PUBLIC
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
if ( NOT NSTATIC )
target_link_libraries ( btf_static PUBLIC ${SUITESPARSE_CONFIG_STATIC} )
if ( TARGET SuiteSparse::SuiteSparseConfig_static )
target_link_libraries ( BTF_static PUBLIC SuiteSparse::SuiteSparseConfig_static )
else ( )
target_link_libraries ( BTF_static PUBLIC SuiteSparse::SuiteSparseConfig )
endif ( )
endif ( )

# libm:
if ( NOT WIN32 )
target_link_libraries ( btf PRIVATE m )
target_link_libraries ( BTF PRIVATE m )
if ( NOT NSTATIC )
target_link_libraries ( btf_static PUBLIC m )
set ( BTF_STATIC_LIBS "${BTF_STATIC_LIBS} -lm" )
target_link_libraries ( BTF_static PUBLIC m )
endif ( )
endif ( )

#-------------------------------------------------------------------------------
# BTF installation location
#-------------------------------------------------------------------------------

install ( TARGETS btf
include ( CMakePackageConfigHelpers )

install ( TARGETS BTF
EXPORT BTFTargets
LIBRARY DESTINATION ${SUITESPARSE_LIBDIR}
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR}
RUNTIME DESTINATION ${SUITESPARSE_BINDIR}
PUBLIC_HEADER DESTINATION ${SUITESPARSE_INCLUDEDIR} )
install ( FILES ${CMAKE_SOURCE_DIR}/cmake_modules/FindBTF.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/SuiteSparse
COMPONENT Development )
if ( NOT NSTATIC )
install ( TARGETS btf_static
install ( TARGETS BTF_static
EXPORT BTFTargets
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} )
endif ( )

# create (temporary) export target file during build
export ( EXPORT BTFTargets
NAMESPACE SuiteSparse::
FILE ${CMAKE_CURRENT_BINARY_DIR}/BTFTargets.cmake )

# install export target, config and version files for find_package
install ( EXPORT BTFTargets
NAMESPACE SuiteSparse::
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/BTF )

configure_package_config_file (
Config/BTFConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/BTFConfig.cmake
INSTALL_DESTINATION ${SUITESPARSE_LIBDIR}/cmake/BTF )

write_basic_package_version_file (
${CMAKE_CURRENT_BINARY_DIR}/BTFConfigVersion.cmake
COMPATIBILITY SameMajorVersion )

install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/BTFConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/BTFConfigVersion.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/BTF )

#-------------------------------------------------------------------------------
# create pkg-config file
#-------------------------------------------------------------------------------

if ( NOT MSVC )
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE )
if (SUITESPARSE_LIBDIR_IS_ABSOLUTE)
set ( libdir "${SUITESPARSE_LIBDIR}")
else ( )
set ( libdir "\${exec_prefix}/${SUITESPARSE_LIBDIR}")
endif ( )
cmake_path ( IS_ABSOLUTE SUITESPARSE_INCLUDEDIR SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE )
if (SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE)
set ( includedir "${SUITESPARSE_INCLUDEDIR}")
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
configure_file (
Config/BTF.pc.in
BTF.pc
@ONLY
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/BTF.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
endif ( )

#-------------------------------------------------------------------------------
# report status
#-------------------------------------------------------------------------------
Expand Down
17 changes: 17 additions & 0 deletions BTF/Config/BTF.pc.in
@@ -0,0 +1,17 @@
# BTF, Copyright (c) 2004-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: LGPL-2.1-or-later

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: BTF
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Software package for permuting a matrix into block upper triangular form in SuiteSparse
Version: @BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@
Requires.private: SuiteSparse_config
Libs: -L${libdir} -lbtf
Libs.private: @BTF_STATIC_LIBS@
Cflags: -I${includedir}
121 changes: 121 additions & 0 deletions BTF/Config/BTFConfig.cmake.in
@@ -0,0 +1,121 @@
#-------------------------------------------------------------------------------
# SuiteSparse/BTF/cmake_modules/BTFConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# BTFConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the BTF include file and compiled library.
# The following targets are defined:
# SuiteSparse::BTF - for the shared library (if available)
# SuiteSparse::BTF_static - for the static library (if available)

# For backward compatibility the following variables are set:

# BTF_INCLUDE_DIR - where to find btf.h
# BTF_LIBRARY - dynamic BTF library
# BTF_STATIC - static BTF library
# BTF_LIBRARIES - libraries when using BTF
# BTF_FOUND - true if BTF found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( BTF_DATE "@BTF_DATE@" )
set ( BTF_VERSION_MAJOR @BTF_VERSION_MAJOR@ )
set ( BTF_VERSION_MINOR @BTF_VERSION_MINOR@ )
set ( BTF_VERSION_SUB @BTF_VERSION_SUB@ )
set ( BTF_VERSION "@BTF_VERSION_MAJOR@.@BTF_VERSION_MINOR@.@BTF_VERSION_SUB@" )

include ( ${CMAKE_CURRENT_LIST_DIR}/BTFTargets.cmake )

# The following is only for backward compatibility with FindBTF.

set ( _target_shared SuiteSparse::BTF )
set ( _target_static SuiteSparse::BTF_static )
set ( _var_prefix "BTF" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( BTF_LIBRARIES ${BTF_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( BTF_INCLUDE_DIR ${BTF_INCLUDE_DIR} )
suitesparse_check_exist ( BTF_LIBRARY ${BTF_LIBRARY} )

message ( STATUS "BTF version: ${BTF_VERSION}" )
message ( STATUS "BTF include: ${BTF_INCLUDE_DIR}" )
message ( STATUS "BTF library: ${BTF_LIBRARY}" )
message ( STATUS "BTF static: ${BTF_STATIC}" )
4 changes: 4 additions & 0 deletions BTF/Doc/ChangeLog
@@ -1,3 +1,7 @@
Sept 8, 2023: version 2.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel

June 16, 2023: version 2.0.4

* cmake build system updates: update by Markus Muetzel
Expand Down
6 changes: 3 additions & 3 deletions BTF/Include/btf.h
Expand Up @@ -254,10 +254,10 @@ int64_t btf_l_order (int64_t, int64_t *, int64_t *, double , double *,
* #endif
*/

#define BTF_DATE "June 16, 2023"
#define BTF_DATE "Sept 8, 2023"
#define BTF_MAIN_VERSION 2
#define BTF_SUB_VERSION 0
#define BTF_SUBSUB_VERSION 4
#define BTF_SUB_VERSION 2
#define BTF_SUBSUB_VERSION 0

#define BTF_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
#define BTF_VERSION BTF_VERSION_CODE(BTF_MAIN_VERSION,BTF_SUB_VERSION)
Expand Down
129 changes: 0 additions & 129 deletions BTF/cmake_modules/FindBTF.cmake

This file was deleted.

124 changes: 99 additions & 25 deletions CAMD/CMakeLists.txt
Expand Up @@ -9,12 +9,12 @@
# get the version
#-------------------------------------------------------------------------------

cmake_minimum_required ( VERSION 3.19 )
cmake_minimum_required ( VERSION 3.20 )

set ( CAMD_DATE "June 16, 2023" )
set ( CAMD_DATE "Sept 8, 2023" )
set ( CAMD_VERSION_MAJOR 3 )
set ( CAMD_VERSION_MINOR 0 )
set ( CAMD_VERSION_SUB 4 )
set ( CAMD_VERSION_MINOR 2 )
set ( CAMD_VERSION_SUB 0 )

message ( STATUS "Building CAMD version: v"
${CAMD_VERSION_MAJOR}.
Expand All @@ -26,7 +26,6 @@ message ( STATUS "Building CAMD version: v"
#-------------------------------------------------------------------------------

set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules
${CMAKE_SOURCE_DIR}/../SuiteSparse_config/cmake_modules )

include ( SuiteSparsePolicy )
Expand All @@ -43,7 +42,11 @@ project ( camd
# find library dependencies
#-------------------------------------------------------------------------------

find_package ( SuiteSparse_config 7.1.0 REQUIRED )
find_package ( SuiteSparse_config 7.2.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.2.0 REQUIRED )
endif ( )

#-------------------------------------------------------------------------------
# configure files
Expand All @@ -60,78 +63,149 @@ configure_file ( "Config/camd_version.tex.in"
# include directories
#-------------------------------------------------------------------------------

include_directories ( Source Include ${SUITESPARSE_CONFIG_INCLUDE_DIR} )
include_directories ( Source Include )

#-------------------------------------------------------------------------------
# dynamic camd library properties
#-------------------------------------------------------------------------------

file ( GLOB CAMD_SOURCES "Source/*.c" )

add_library ( camd SHARED ${CAMD_SOURCES} )
add_library ( CAMD SHARED ${CAMD_SOURCES} )

set_target_properties ( camd PROPERTIES
set_target_properties ( CAMD PROPERTIES
VERSION ${CAMD_VERSION_MAJOR}.${CAMD_VERSION_MINOR}.${CAMD_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME camd
SOVERSION ${CAMD_VERSION_MAJOR}
PUBLIC_HEADER "Include/camd.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON )

target_include_directories ( CAMD
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

#-------------------------------------------------------------------------------
# static camd library properties
#-------------------------------------------------------------------------------

if ( NOT NSTATIC )
add_library ( camd_static STATIC ${CAMD_SOURCES} )
add_library ( CAMD_static STATIC ${CAMD_SOURCES} )

set_target_properties ( camd_static PROPERTIES
set_target_properties ( CAMD_static PROPERTIES
VERSION ${CAMD_VERSION_MAJOR}.${CAMD_VERSION_MINOR}.${CAMD_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME camd
SOVERSION ${CAMD_VERSION_MAJOR} )

if ( MSVC )
set_target_properties ( camd_static PROPERTIES
set_target_properties ( CAMD_static PROPERTIES
OUTPUT_NAME camd_static )
endif ( )

target_include_directories ( CAMD_static
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

endif ( )

#-------------------------------------------------------------------------------
# add the library dependencies
#-------------------------------------------------------------------------------

target_link_libraries ( camd PRIVATE ${SUITESPARSE_CONFIG_LIBRARY} )
target_link_libraries ( CAMD PRIVATE SuiteSparse::SuiteSparseConfig )
target_include_directories ( CAMD PUBLIC
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
if ( NOT NSTATIC )
target_link_libraries ( camd_static PUBLIC ${SUITESPARSE_CONFIG_STATIC} )
if ( TARGET SuiteSparse::SuiteSparseConfig_static )
target_link_libraries ( CAMD_static PUBLIC SuiteSparse::SuiteSparseConfig_static )
else ( )
target_link_libraries ( CAMD_static PUBLIC SuiteSparse::SuiteSparseConfig )
endif ( )
endif ( )

# libm:
if ( NOT WIN32 )
target_link_libraries ( camd PRIVATE m )
target_link_libraries ( CAMD PRIVATE m )
if ( NOT NSTATIC )
target_link_libraries ( camd_static PUBLIC m )
set ( CAMD_STATIC_LIBS "${CAMD_STATIC_LIBS} -lm" )
target_link_libraries ( CAMD_static PUBLIC m )
endif ( )
endif ( )

#-------------------------------------------------------------------------------
# CAMD installation location
#-------------------------------------------------------------------------------

install ( TARGETS camd
include ( CMakePackageConfigHelpers )

install ( TARGETS CAMD
EXPORT CAMDTargets
LIBRARY DESTINATION ${SUITESPARSE_LIBDIR}
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR}
RUNTIME DESTINATION ${SUITESPARSE_BINDIR}
PUBLIC_HEADER DESTINATION ${SUITESPARSE_INCLUDEDIR} )
install ( FILES ${CMAKE_SOURCE_DIR}/cmake_modules/FindCAMD.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/SuiteSparse
COMPONENT Development )
if ( NOT NSTATIC )
install ( TARGETS camd_static
install ( TARGETS CAMD_static
EXPORT CAMDTargets
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} )
endif ( )

# create (temporary) export target file during build
export ( EXPORT CAMDTargets
NAMESPACE SuiteSparse::
FILE ${CMAKE_CURRENT_BINARY_DIR}/CAMDTargets.cmake )

# install export target, config and version files for find_package
install ( EXPORT CAMDTargets
NAMESPACE SuiteSparse::
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CAMD )

configure_package_config_file (
Config/CAMDConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CAMDConfig.cmake
INSTALL_DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CAMD )

write_basic_package_version_file (
${CMAKE_CURRENT_BINARY_DIR}/CAMDConfigVersion.cmake
COMPATIBILITY SameMajorVersion )

install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CAMDConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/CAMDConfigVersion.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CAMD )

#-------------------------------------------------------------------------------
# create pkg-config file
#-------------------------------------------------------------------------------

if ( NOT MSVC )
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE )
if (SUITESPARSE_LIBDIR_IS_ABSOLUTE)
set ( libdir "${SUITESPARSE_LIBDIR}")
else ( )
set ( libdir "\${exec_prefix}/${SUITESPARSE_LIBDIR}")
endif ( )
cmake_path ( IS_ABSOLUTE SUITESPARSE_INCLUDEDIR SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE )
if (SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE)
set ( includedir "${SUITESPARSE_INCLUDEDIR}")
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
configure_file (
Config/CAMD.pc.in
CAMD.pc
@ONLY
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CAMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
endif ( )

#-------------------------------------------------------------------------------
# Demo library and programs
#-------------------------------------------------------------------------------
Expand All @@ -155,10 +229,10 @@ if ( DEMO )
add_executable ( camd_simple "Demo/camd_simple.c" )

# Libraries required for Demo programs
target_link_libraries ( camd_demo PUBLIC camd )
target_link_libraries ( camd_l_demo PUBLIC camd )
target_link_libraries ( camd_demo2 PUBLIC camd )
target_link_libraries ( camd_simple PUBLIC camd )
target_link_libraries ( camd_demo PUBLIC CAMD )
target_link_libraries ( camd_l_demo PUBLIC CAMD )
target_link_libraries ( camd_demo2 PUBLIC CAMD )
target_link_libraries ( camd_simple PUBLIC CAMD )

else ( )

Expand Down
17 changes: 17 additions & 0 deletions CAMD/Config/CAMD.pc.in
@@ -0,0 +1,17 @@
# CAMD, Copyright (c) 2007-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: BSD-3-Clause

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: CAMD
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Routines for permuting sparse matrices prior to factorization in SuiteSparse
Version: @CAMD_VERSION_MAJOR@.@CAMD_VERSION_MINOR@.@CAMD_VERSION_SUB@
Requires.private: SuiteSparse_config
Libs: -L${libdir} -lcamd
Libs.private: @CAMD_STATIC_LIBS@
Cflags: -I${includedir}
121 changes: 121 additions & 0 deletions CAMD/Config/CAMDConfig.cmake.in
@@ -0,0 +1,121 @@
#-------------------------------------------------------------------------------
# SuiteSparse/CAMD/cmake_modules/CAMDConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# CAMDConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the CAMD include file and compiled library.
# The following targets are defined:
# SuiteSparse::CAMD - for the shared library (if available)
# SuiteSparse::CAMD_static - for the static library (if available)

# For backward compatibility the following variables are set:

# CAMD_INCLUDE_DIR - where to find camd.h
# CAMD_LIBRARY - dynamic CAMD library
# CAMD_STATIC - static CAMD library
# CAMD_LIBRARIES - libraries when using CAMD
# CAMD_FOUND - true if CAMD found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( CAMD_DATE "@CAMD_DATE@" )
set ( CAMD_VERSION_MAJOR @CAMD_VERSION_MAJOR@ )
set ( CAMD_VERSION_MINOR @CAMD_VERSION_MINOR@ )
set ( CAMD_VERSION_PATCH @CAMD_VERSION_SUB@ )
set ( CAMD_VERSION "@CAMD_VERSION_MAJOR@.@CAMD_VERSION_MINOR@.@CAMD_VERSION_SUB@" )

include ( ${CMAKE_CURRENT_LIST_DIR}/CAMDTargets.cmake )

# The following is only for backward compatibility with FindCAMD.

set ( _target_shared SuiteSparse::CAMD )
set ( _target_static SuiteSparse::CAMD_static )
set ( _var_prefix "CAMD" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( AMD_LIBRARIES ${CAMD_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( CAMD_INCLUDE_DIR ${CAMD_INCLUDE_DIR} )
suitesparse_check_exist ( CAMD_LIBRARY ${CAMD_LIBRARY} )

message ( STATUS "CAMD version: ${CAMD_VERSION}" )
message ( STATUS "CAMD include: ${CAMD_INCLUDE_DIR}" )
message ( STATUS "CAMD library: ${CAMD_LIBRARY}" )
message ( STATUS "CAMD static: ${CAMD_STATIC}" )
6 changes: 3 additions & 3 deletions CAMD/Demo/camd_demo.out
@@ -1,7 +1,7 @@
CAMD version 3.0, date: June 16, 2023
CAMD version 3.2, date: Sept 8, 2023
CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

camd version 3.0.4, June 16, 2023: approximate minimum degree ordering:
camd version 3.2.0, Sept 8, 2023: approximate minimum degree ordering:
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from camd_order: 0 (should be 0)

CAMD version 3.0.4, June 16, 2023, results:
CAMD version 3.2.0, Sept 8, 2023, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
4 changes: 2 additions & 2 deletions CAMD/Demo/camd_demo2.out
@@ -1,7 +1,7 @@
CAMD demo, with a jumbled version of the 24-by-24
Harwell/Boeing matrix, can_24:

camd version 3.0.4, June 16, 2023: approximate minimum degree ordering:
camd version 3.2.0, Sept 8, 2023: approximate minimum degree ordering:
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -144,7 +144,7 @@ Plot of symmetric matrix to be ordered by camd_order:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from camd_order: 1 (should be 1)

CAMD version 3.0.4, June 16, 2023, results:
CAMD version 3.2.0, Sept 8, 2023, results:
status: OK, but jumbled
n, dimension of A: 24
nz, number of nonzeros in A: 102
Expand Down
6 changes: 3 additions & 3 deletions CAMD/Demo/camd_l_demo.out
@@ -1,7 +1,7 @@
CAMD version 3.0, date: June 16, 2023
CAMD version 3.2, date: Sept 8, 2023
CAMD demo, with the 24-by-24 Harwell/Boeing matrix, can_24:

camd version 3.0.4, June 16, 2023: approximate minimum degree ordering:
camd version 3.2.0, Sept 8, 2023: approximate minimum degree ordering:
dense row parameter: 10
(rows with more than max (10 * sqrt (n), 16) entries are
considered "dense", and placed last in output permutation)
Expand Down Expand Up @@ -115,7 +115,7 @@ Plot of input matrix pattern:
23: . . . . . . X . . . . X X . . . . . . . . . . X
return value from camd_l_order: 0 (should be 0)

CAMD version 3.0.4, June 16, 2023, results:
CAMD version 3.2.0, Sept 8, 2023, results:
status: OK
n, dimension of A: 24
nz, number of nonzeros in A: 160
Expand Down
Binary file modified CAMD/Doc/CAMD_UserGuide.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions CAMD/Doc/ChangeLog
@@ -1,3 +1,7 @@
Sept 8, 2023: version 3.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel

June 16, 2023: version 3.0.4

* cmake build system updates: update by Markus Muetzel
Expand Down
2 changes: 1 addition & 1 deletion CAMD/Doc/camd_version.tex
@@ -1,2 +1,2 @@
% version of SuiteSparse/CAMD
\date{VERSION 3.0.4, June 16, 2023}
\date{VERSION 3.2.0, Sept 8, 2023}
6 changes: 3 additions & 3 deletions CAMD/Include/camd.h
Expand Up @@ -384,10 +384,10 @@ void camd_l_info (double Info [ ]) ;
* #endif
*/

#define CAMD_DATE "June 16, 2023"
#define CAMD_DATE "Sept 8, 2023"
#define CAMD_MAIN_VERSION 3
#define CAMD_SUB_VERSION 0
#define CAMD_SUBSUB_VERSION 4
#define CAMD_SUB_VERSION 2
#define CAMD_SUBSUB_VERSION 0

#define CAMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
#define CAMD_VERSION CAMD_VERSION_CODE(CAMD_MAIN_VERSION,CAMD_SUB_VERSION)
Expand Down
129 changes: 0 additions & 129 deletions CAMD/cmake_modules/FindCAMD.cmake

This file was deleted.

120 changes: 97 additions & 23 deletions CCOLAMD/CMakeLists.txt
Expand Up @@ -9,12 +9,12 @@
# get the version
#-------------------------------------------------------------------------------

cmake_minimum_required ( VERSION 3.19 )
cmake_minimum_required ( VERSION 3.20 )

set ( CCOLAMD_DATE "June 16, 2023" )
set ( CCOLAMD_DATE "Sept 8, 2023" )
set ( CCOLAMD_VERSION_MAJOR 3 )
set ( CCOLAMD_VERSION_MINOR 0 )
set ( CCOLAMD_VERSION_SUB 4 )
set ( CCOLAMD_VERSION_MINOR 2 )
set ( CCOLAMD_VERSION_SUB 0 )

message ( STATUS "Building CCOLAMD version: v"
${CCOLAMD_VERSION_MAJOR}.
Expand All @@ -26,7 +26,6 @@ message ( STATUS "Building CCOLAMD version: v"
#-------------------------------------------------------------------------------

set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules
${CMAKE_SOURCE_DIR}/../SuiteSparse_config/cmake_modules )

include ( SuiteSparsePolicy )
Expand All @@ -43,7 +42,11 @@ project ( ccolamd
# find library dependencies
#-------------------------------------------------------------------------------

find_package ( SuiteSparse_config 7.1.0 REQUIRED )
find_package ( SuiteSparse_config 7.2.0
PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH )
if ( NOT TARGET SuiteSparse::SuiteSparseConfig )
find_package ( SuiteSparse_config 7.2.0 REQUIRED )
endif ( )

#-------------------------------------------------------------------------------
# configure files
Expand All @@ -57,78 +60,149 @@ configure_file ( "Config/ccolamd.h.in"
# include directories
#-------------------------------------------------------------------------------

include_directories ( Source Include ${SUITESPARSE_CONFIG_INCLUDE_DIR} )
include_directories ( Source Include )

#-------------------------------------------------------------------------------
# dynamic ccolamd library properties
#-------------------------------------------------------------------------------

file ( GLOB CCOLAMD_SOURCES "Source/*.c" )

add_library ( ccolamd SHARED ${CCOLAMD_SOURCES} )
add_library ( CCOLAMD SHARED ${CCOLAMD_SOURCES} )

set_target_properties ( ccolamd PROPERTIES
set_target_properties ( CCOLAMD PROPERTIES
VERSION ${CCOLAMD_VERSION_MAJOR}.${CCOLAMD_VERSION_MINOR}.${CCOLAMD_VERSION_SUB}
C_STANDARD 11
C_STANDARD_REQUIRED ON
OUTPUT_NAME ccolamd
SOVERSION ${CCOLAMD_VERSION_MAJOR}
PUBLIC_HEADER "Include/ccolamd.h"
WINDOWS_EXPORT_ALL_SYMBOLS ON )

target_include_directories ( CCOLAMD
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

#-------------------------------------------------------------------------------
# static ccolamd library properties
#-------------------------------------------------------------------------------

if ( NOT NSTATIC )
add_library ( ccolamd_static STATIC ${CCOLAMD_SOURCES} )
add_library ( CCOLAMD_static STATIC ${CCOLAMD_SOURCES} )

set_target_properties ( ccolamd_static PROPERTIES
set_target_properties ( CCOLAMD_static PROPERTIES
VERSION ${CCOLAMD_VERSION_MAJOR}.${CCOLAMD_VERSION_MINOR}.${CCOLAMD_VERSION_SUB}
OUTPUT_NAME ccolamd
C_STANDARD 11
C_STANDARD_REQUIRED ON
SOVERSION ${CCOLAMD_VERSION_MAJOR} )

if ( MSVC )
set_target_properties ( ccolamd_static PROPERTIES
set_target_properties ( CCOLAMD_static PROPERTIES
OUTPUT_NAME ccolamd_static )
endif ( )

target_include_directories ( CCOLAMD_static
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Include>
$<INSTALL_INTERFACE:${SUITESPARSE_INCLUDEDIR}> )

endif ( )

#-------------------------------------------------------------------------------
# add the library dependencies
#-------------------------------------------------------------------------------

target_link_libraries ( ccolamd PRIVATE ${SUITESPARSE_CONFIG_LIBRARY} )
target_link_libraries ( CCOLAMD PRIVATE SuiteSparse::SuiteSparseConfig )
target_include_directories ( CCOLAMD PUBLIC
"$<TARGET_PROPERTY:SuiteSparse::SuiteSparseConfig,INTERFACE_INCLUDE_DIRECTORIES>" )
if ( NOT NSTATIC )
target_link_libraries ( ccolamd_static PUBLIC ${SUITESPARSE_CONFIG_STATIC} )
if ( TARGET SuiteSparse::SuiteSparseConfig_static )
target_link_libraries ( CCOLAMD_static PUBLIC SuiteSparse::SuiteSparseConfig_static )
else ( )
target_link_libraries ( CCOLAMD_static PUBLIC SuiteSparse::SuiteSparseConfig )
endif ( )
endif ( )

# libm:
if ( NOT WIN32 )
target_link_libraries ( ccolamd PRIVATE m )
target_link_libraries ( CCOLAMD PRIVATE m )
if ( NOT NSTATIC )
target_link_libraries ( ccolamd_static PUBLIC m )
set ( CCOLAMD_STATIC_LIBS "${CCOLAMD_STATIC_LIBS} -lm" )
target_link_libraries ( CCOLAMD_static PUBLIC m )
endif ( )
endif ( )

#-------------------------------------------------------------------------------
# COLAMD installation location
#-------------------------------------------------------------------------------

install ( TARGETS ccolamd
include ( CMakePackageConfigHelpers )

install ( TARGETS CCOLAMD
EXPORT CCOLAMDTargets
LIBRARY DESTINATION ${SUITESPARSE_LIBDIR}
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR}
RUNTIME DESTINATION ${SUITESPARSE_BINDIR}
PUBLIC_HEADER DESTINATION ${SUITESPARSE_INCLUDEDIR} )
install ( FILES ${CMAKE_SOURCE_DIR}/cmake_modules/FindCCOLAMD.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/SuiteSparse
COMPONENT Development )
if ( NOT NSTATIC )
install ( TARGETS ccolamd_static
install ( TARGETS CCOLAMD_static
EXPORT CCOLAMDTargets
ARCHIVE DESTINATION ${SUITESPARSE_LIBDIR} )
endif ( )

# create (temporary) export target file during build
export ( EXPORT CCOLAMDTargets
NAMESPACE SuiteSparse::
FILE ${CMAKE_CURRENT_BINARY_DIR}/CCOLAMDTargets.cmake )

# install export target, config and version files for find_package
install ( EXPORT CCOLAMDTargets
NAMESPACE SuiteSparse::
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CCOLAMD )

configure_package_config_file (
Config/CCOLAMDConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMDConfig.cmake
INSTALL_DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CCOLAMD )

write_basic_package_version_file (
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMDConfigVersion.cmake
COMPATIBILITY SameMajorVersion )

install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMDConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMDConfigVersion.cmake
DESTINATION ${SUITESPARSE_LIBDIR}/cmake/CCOLAMD )

#-------------------------------------------------------------------------------
# create pkg-config file
#-------------------------------------------------------------------------------

if ( NOT MSVC )
set ( prefix "${CMAKE_INSTALL_PREFIX}" )
set ( exec_prefix "\${prefix}" )
cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE )
if (SUITESPARSE_LIBDIR_IS_ABSOLUTE)
set ( libdir "${SUITESPARSE_LIBDIR}")
else ( )
set ( libdir "\${exec_prefix}/${SUITESPARSE_LIBDIR}")
endif ( )
cmake_path ( IS_ABSOLUTE SUITESPARSE_INCLUDEDIR SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE )
if (SUITESPARSE_INCLUDEDIR_IS_ABSOLUTE)
set ( includedir "${SUITESPARSE_INCLUDEDIR}")
else ( )
set ( includedir "\${prefix}/${SUITESPARSE_INCLUDEDIR}")
endif ( )
configure_file (
Config/CCOLAMD.pc.in
CCOLAMD.pc
@ONLY
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
endif ( )

#-------------------------------------------------------------------------------
# Demo library and programs
#-------------------------------------------------------------------------------
Expand All @@ -150,8 +224,8 @@ if ( DEMO )
add_executable ( ccolamd_l_example "Demo/ccolamd_l_example.c" )

# Libraries required for Demo programs
target_link_libraries ( ccolamd_example PUBLIC ccolamd )
target_link_libraries ( ccolamd_l_example PUBLIC ccolamd )
target_link_libraries ( ccolamd_example PUBLIC CCOLAMD )
target_link_libraries ( ccolamd_l_example PUBLIC CCOLAMD )

else ( )

Expand Down
17 changes: 17 additions & 0 deletions CCOLAMD/Config/CCOLAMD.pc.in
@@ -0,0 +1,17 @@
# CCOLAMD, Copyright (c) 2005-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: BSD-3-Clause

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: CCOLAMD
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Routines for column approximate minimum degree ordering algorithm in SuiteSparse
Version: @CCOLAMD_VERSION_MAJOR@.@CCOLAMD_VERSION_MINOR@.@CCOLAMD_VERSION_SUB@
Requires.private: SuiteSparse_config
Libs: -L${libdir} -lccolamd
Libs.private: @CCOLAMD_STATIC_LIBS@
Cflags: -I${includedir}
121 changes: 121 additions & 0 deletions CCOLAMD/Config/CCOLAMDConfig.cmake.in
@@ -0,0 +1,121 @@
#-------------------------------------------------------------------------------
# SuiteSparse/CCOLAMD/cmake_modules/CCOLAMDConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# CCOLAMDConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the CCOLAMD include file and compiled library.
# The following targets are defined:
# SuiteSparse::CCOLAMD - for the shared library (if available)
# SuiteSparse::CCOLAMD_static - for the static library (if available)

# For backward compatibility the following variables are set:

# CCOLAMD_INCLUDE_DIR - where to find ccolamd.h
# CCOLAMD_LIBRARY - dynamic CCOLAMD library
# CCOLAMD_STATIC - static CCOLAMD library
# CCOLAMD_LIBRARIES - libraries when using CCOLAMD
# CCOLAMD_FOUND - true if CCOLAMD found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( CCOLAMD_DATE "@CCOLAMD_DATE@" )
set ( CCOLAMD_VERSION_MAJOR @CCOLAMD_VERSION_MAJOR@ )
set ( CCOLAMD_VERSION_MINOR @CCOLAMD_VERSION_MINOR@ )
set ( CCOLAMD_VERSION_PATCH @CCOLAMD_VERSION_SUB@ )
set ( CCOLAMD_VERSION "@CCOLAMD_VERSION_MAJOR@.@CCOLAMD_VERSION_MINOR@.@CCOLAMD_VERSION_SUB@" )

include ( ${CMAKE_CURRENT_LIST_DIR}/CCOLAMDTargets.cmake )

# The following is only for backward compatibility with FindCCOLAMD.

set ( _target_shared SuiteSparse::CCOLAMD )
set ( _target_static SuiteSparse::CCOLAMD_static )
set ( _var_prefix "CCOLAMD" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( CCOLAMD_LIBRARIES ${CCOLAMD_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( CCOLAMD_INCLUDE_DIR ${CCOLAMD_INCLUDE_DIR} )
suitesparse_check_exist ( CCOLAMD_LIBRARY ${CCOLAMD_LIBRARY} )

message ( STATUS "CCOLAMD version: ${CCOLAMD_VERSION}" )
message ( STATUS "CCOLAMD include: ${CCOLAMD_INCLUDE_DIR}" )
message ( STATUS "CCOLAMD library: ${CCOLAMD_LIBRARY}" )
message ( STATUS "CCOLAMD static: ${CCOLAMD_STATIC}" )
4 changes: 2 additions & 2 deletions CCOLAMD/Demo/ccolamd_example.out
Expand Up @@ -15,7 +15,7 @@ Column 3, with 2 entries:
row 1
row 3

ccolamd version 3.0.4, June 16, 2023: OK.
ccolamd version 3.2.0, Sept 8, 2023: OK.
ccolamd: number of dense or empty rows ignored: 0
ccolamd: number of dense or empty columns ignored: 0
ccolamd: number of garbage collections performed: 0
Expand All @@ -38,7 +38,7 @@ Column 3, with 1 entries:
row 4
Column 4, with 0 entries:

csymamd version 3.0.4, June 16, 2023: OK.
csymamd version 3.2.0, Sept 8, 2023: OK.
csymamd: number of dense or empty rows ignored: 0
csymamd: number of dense or empty columns ignored: 0
csymamd: number of garbage collections performed: 0
Expand Down
4 changes: 2 additions & 2 deletions CCOLAMD/Demo/ccolamd_l_example.out
Expand Up @@ -15,7 +15,7 @@ Column 3, with 2 entries:
row 1
row 3

ccolamd version 3.0.4, June 16, 2023: OK.
ccolamd version 3.2.0, Sept 8, 2023: OK.
ccolamd: number of dense or empty rows ignored: 0
ccolamd: number of dense or empty columns ignored: 0
ccolamd: number of garbage collections performed: 0
Expand All @@ -38,7 +38,7 @@ Column 3, with 1 entries:
row 4
Column 4, with 0 entries:

csymamd version 3.0.4, June 16, 2023: OK.
csymamd version 3.2.0, Sept 8, 2023: OK.
csymamd: number of dense or empty rows ignored: 0
csymamd: number of dense or empty columns ignored: 0
csymamd: number of garbage collections performed: 0
Expand Down
4 changes: 4 additions & 0 deletions CCOLAMD/Doc/ChangeLog
@@ -1,3 +1,7 @@
Sept 8, 2023: version 3.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel

June 16, 2023: version 3.0.4

* cmake build system updates: update by Markus Muetzel
Expand Down
6 changes: 3 additions & 3 deletions CCOLAMD/Include/ccolamd.h
Expand Up @@ -41,10 +41,10 @@ extern "C" {
* #endif
*/

#define CCOLAMD_DATE "June 16, 2023"
#define CCOLAMD_DATE "Sept 8, 2023"
#define CCOLAMD_MAIN_VERSION 3
#define CCOLAMD_SUB_VERSION 0
#define CCOLAMD_SUBSUB_VERSION 4
#define CCOLAMD_SUB_VERSION 2
#define CCOLAMD_SUBSUB_VERSION 0

#define CCOLAMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
#define CCOLAMD_VERSION \
Expand Down
129 changes: 0 additions & 129 deletions CCOLAMD/cmake_modules/FindCCOLAMD.cmake

This file was deleted.

334 changes: 257 additions & 77 deletions CHOLMOD/CMakeLists.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CHOLMOD/Check/cholmod_check.c
Expand Up @@ -69,7 +69,7 @@
/* === printing definitions ================================================= */
/* ========================================================================== */

#ifdef LONG
#if ( ITYPE == CHOLMOD_LONG )
#define I8 "%8ld"
#define I_8 "%-8ld"
#else
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Cholesky/cholmod_amd.c
Expand Up @@ -166,7 +166,7 @@ int CHOLMOD(amd)
Control [AMD_AGGRESSIVE] = Common->method [Common->current].aggressive ;
}

#ifdef LONG
#if ( ITYPE == CHOLMOD_LONG )
amd_l2 (n, C->p, C->i, Len, C->nzmax, cnz, Nv, Next, Perm, Head, Elen,
Degree, Wi, Control, Info) ;
#else
Expand Down
4 changes: 2 additions & 2 deletions CHOLMOD/Cholesky/cholmod_colamd.c
Expand Up @@ -92,7 +92,7 @@ int CHOLMOD(colamd)
s = CHOLMOD(mult_size_t) (nrow, 4, &ok) ;
s = CHOLMOD(add_size_t) (s, ncol, &ok) ;

#ifdef LONG
#if ( ITYPE == CHOLMOD_LONG )
alen = colamd_l_recommended (A->nzmax, ncol, nrow) ;
colamd_l_set_defaults (knobs) ;
#else
Expand Down Expand Up @@ -151,7 +151,7 @@ int CHOLMOD(colamd)
Int stats [COLAMD_STATS] ;
Cp = C->p ;

#ifdef LONG
#if ( ITYPE == CHOLMOD_LONG )
colamd_l (ncol, nrow, alen, C->i, Cp, knobs, stats) ;
#else
colamd (ncol, nrow, alen, C->i, Cp, knobs, stats) ;
Expand Down
5 changes: 3 additions & 2 deletions CHOLMOD/Cholesky/cholmod_postorder.c
Expand Up @@ -139,7 +139,7 @@ Int CHOLMOD(postorder) /* return # of nodes postordered */
(
/* ---- input ---- */
Int *Parent, /* size n. Parent [j] = p if p is the parent of j */
size_t n,
size_t n_input,
Int *Weight, /* size n, optional. Weight [j] is weight of node j */
/* ---- output --- */
Int *Post, /* size n. Post [k] = j is kth in postordered tree */
Expand All @@ -151,6 +151,7 @@ Int CHOLMOD(postorder) /* return # of nodes postordered */
Int j, p, k, w, nextj ;
size_t s ;
int ok = TRUE ;
Int n = (Int) n_input ;

/* ---------------------------------------------------------------------- */
/* check inputs */
Expand All @@ -166,7 +167,7 @@ Int CHOLMOD(postorder) /* return # of nodes postordered */
/* ---------------------------------------------------------------------- */

/* s = 2*n */
s = CHOLMOD(mult_size_t) (n, 2, &ok) ;
s = CHOLMOD(mult_size_t) (n_input, (size_t) 2, &ok) ;
if (!ok)
{
ERROR (CHOLMOD_TOO_LARGE, "problem too large") ;
Expand Down
19 changes: 19 additions & 0 deletions CHOLMOD/Config/CHOLMOD.pc.in
@@ -0,0 +1,19 @@
# CHOLMOD, Copyright (c) 2005-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: LGPL-2.1-or-later AND GPL-2.0-or-later AND Apache-2.0

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

# FIXME: Which flags do we need to statically link CUDA if needed?

Name: CHOLMOD
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: Routines for factorizing sparse symmetric positive definite matrices in SuiteSparse
Version: @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@
Requires.private: SuiteSparse_config AMD COLAMD @CHOLMOD_STATIC_MODULES@
Libs: -L${libdir} -lcholmod
Libs.private: @CHOLMOD_STATIC_LIBS@
Cflags: -I${includedir} @CHOLMOD_CFLAGS@
151 changes: 151 additions & 0 deletions CHOLMOD/Config/CHOLMODConfig.cmake.in
@@ -0,0 +1,151 @@
#-------------------------------------------------------------------------------
# SuiteSparse/CHOLMOD/cmake_modules/CHOLMODConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# CHOLMODConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the CHOLMOD include file and compiled library.
# The following targets are defined:
# SuiteSparse::CHOLMOD - for the shared library (if available)
# SuiteSparse::CHOLMOD_static - for the static library (if available)

# For backward compatibility the following variables are set:

# CHOLMOD_INCLUDE_DIR - where to find cholmod.h
# CHOLMOD_LIBRARY - compiled CHOLMOD library
# CHOLMOD_LIBRARIES - libraries when using CHOLMOD
# CHOLMOD_FOUND - true if CHOLMOD found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( CHOLMOD_DATE "@CHOLMOD_DATE@" )
set ( CHOLMOD_VERSION_MAJOR @CHOLMOD_VERSION_MAJOR@ )
set ( CHOLMOD_VERSION_MINOR @CHOLMOD_VERSION_MINOR@ )
set ( CHOLMOD_VERSION_PATCH @CHOLMOD_VERSION_SUB@ )
set ( CHOLMOD_VERSION "@CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@" )

# Check for dependent targets
include ( CMakeFindDependencyMacro )
set ( _dependencies_found ON )

if ( @SUITESPARSE_CUDA@ )
# Look for imported targets of additional dependency if CHOLMOD was built with CUDA

if ( NOT CHOLMOD_CUDA_FOUND )
if ( @SUITESPARSE_IN_BUILD_TREE@ )
# First check in a common build tree
find_dependency ( CHOLMOD_CUDA @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@
PATHS ${CMAKE_SOURCE_DIR}/../CHOLMOD/build NO_DEFAULT_PATH )
# Then, check in the currently active CMAKE_MODULE_PATH
if ( NOT CHOLMOD_CUDA_FOUND )
find_dependency ( CHOLMOD_CUDA @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@ )
endif ( )
else ( )
find_dependency ( CHOLMOD_CUDA @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@ )
endif ( )
endif ( )
if ( NOT CHOLMOD_CUDA_FOUND )
set ( _dependencies_found OFF )
endif ( )
endif ( )

if ( NOT _dependencies_found )
set ( CHOLMOD_FOUND OFF )
return ( )
endif ( )

# Import target
include ( ${CMAKE_CURRENT_LIST_DIR}/CHOLMODTargets.cmake )

# The following is only for backward compatibility with FindCHOLMOD.

set ( _target_shared SuiteSparse::CHOLMOD )
set ( _target_static SuiteSparse::CHOLMOD_static )
set ( _var_prefix "CHOLMOD" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( CHOLMOD_INCLUDE_DIR ${CHOLMOD_INCLUDE_DIR} )
suitesparse_check_exist ( CHOLMOD_LIBRARY ${CHOLMOD_LIBRARY} )

message ( STATUS "CHOLMOD version: ${CHOLMOD_VERSION}" )
message ( STATUS "CHOLMOD include: ${CHOLMOD_INCLUDE_DIR}" )
message ( STATUS "CHOLMOD library: ${CHOLMOD_LIBRARY}" )
message ( STATUS "CHOLMOD static: ${CHOLMOD_STATIC}" )
17 changes: 17 additions & 0 deletions CHOLMOD/Config/CHOLMOD_CUDA.pc.in
@@ -0,0 +1,17 @@
# CHOLMOD_CUDA, Copyright (c) 2005-2023, Timothy A. Davis.
# All Rights Reserved.
# SPDX-License-Identifier: GPL-2.0-or-later

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

# FIXME: Which flags do we need for static linking?

Name: CHOLMOD_CUDA
URL: https://github.com/DrTimothyAldenDavis/SuiteSparse
Description: CHOLMOD/GPU module in SuiteSparse
Version: @CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@
Libs: -L${libdir} -lcholmod_cuda
Cflags: -I${includedir} -DSUITESPARSE_CUDA
136 changes: 136 additions & 0 deletions CHOLMOD/Config/CHOLMOD_CUDAConfig.cmake.in
@@ -0,0 +1,136 @@
#-------------------------------------------------------------------------------
# SuiteSparse/CHOLMOD/cmake_modules/CHOLMOD_CUDAConfig.cmake
#-------------------------------------------------------------------------------

# The following copyright and license applies to just this file only, not to
# the library itself:
# CHOLMOD_CUDAConfig.cmake, Copyright (c) 2023, Timothy A. Davis. All Rights Reserved.
# SPDX-License-Identifier: BSD-3-clause

#-------------------------------------------------------------------------------

# Finds the CHOLMOD_CUDA include file and compiled library.
# The following targets are defined:
# SuiteSparse::CHOLMOD_CUDA - for the shared library (if available)
# SuiteSparse::CHOLMOD_CUDA_static - for the static library (if available)

# For backward compatibility the following variables are set:

# CHOLMOD_CUDA_LIBRARY - dynamic CHOLMOD_CUDA library
# CHOLMOD_CUDA_STATIC - static CHOLMOD_CUDA library
# CHOLMOD_CUDA_LIBRARIES - libraries when using CHOLMOD_CUDA
# CHOLMOD_CUDA_FOUND - true if CHOLMOD_CUDA found

# Set ``CMAKE_MODULE_PATH`` to the parent folder where this module file is
# installed.

#-------------------------------------------------------------------------------

@PACKAGE_INIT@

set ( CHOLMOD_CUDA_DATE "@CHOLMOD_DATE@" )
set ( CHOLMOD_CUDA_VERSION_MAJOR @CHOLMOD_VERSION_MAJOR@ )
set ( CHOLMOD_CUDA_VERSION_MINOR @CHOLMOD_VERSION_MINOR@ )
set ( CHOLMOD_CUDA_VERSION_PATCH @CHOLMOD_VERSION_SUB@ )
set ( CHOLMOD_CUDA_VERSION "@CHOLMOD_VERSION_MAJOR@.@CHOLMOD_VERSION_MINOR@.@CHOLMOD_VERSION_SUB@" )

# Check for dependent targets
include ( CMakeFindDependencyMacro )
set ( _dependencies_found ON )

# Look for NVIDIA CUDA toolkit
if ( NOT CUDAToolkit_FOUND )
find_dependency ( CUDAToolkit @CUDAToolkit_VERSION_MAJOR@ )
if ( NOT CUDAToolkit_FOUND )
set ( _dependencies_found OFF )
endif ( )
endif ( )

if ( NOT _dependencies_found )
set ( CHOLMOD_CUDA_FOUND OFF )
return ( )
endif ( )

# Import target
include ( ${CMAKE_CURRENT_LIST_DIR}/CHOLMOD_CUDATargets.cmake )

# The following is only for backward compatibility with FindCHOLMOD_CUDA.

set ( _target_shared SuiteSparse::CHOLMOD_CUDA )
set ( _target_static SuiteSparse::CHOLMOD_CUDA_static )
set ( _var_prefix "CHOLMOD_CUDA" )

get_target_property ( ${_var_prefix}_INCLUDE_DIR ${_target_shared} INTERFACE_INCLUDE_DIRECTORIES )
if ( ${_var_prefix}_INCLUDE_DIR )
# First item in SuiteSparse targets contains the "main" header directory.
list ( GET ${_var_prefix}_INCLUDE_DIR 0 ${_var_prefix}_INCLUDE_DIR )
endif ( )
get_target_property ( ${_var_prefix}_LIBRARY ${_target_shared} IMPORTED_IMPLIB )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared} IMPORTED_LOCATION )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} )
get_target_property ( ${_var_prefix}_STATIC ${_target_static} IMPORTED_LOCATION )
endif ( )

# Check for most common build types
set ( _config_types "Debug" "Release" "RelWithDebInfo" "MinSizeRel" )

get_property ( _isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
if ( _isMultiConfig )
# For multi-configuration generators (e.g., Visual Studio), prefer those
# configurations.
list ( PREPEND _config_types ${CMAKE_CONFIGURATION_TYPES} )
else ( )
# For single-configuration generators, prefer the current configuration.
list ( PREPEND _config_types ${CMAKE_BUILD_TYPE} )
endif ( )

list ( REMOVE_DUPLICATES _config_types )

foreach ( _config ${_config_types} )
string ( TOUPPER ${_config} _uc_config )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_IMPLIB_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( NOT ${_var_prefix}_LIBRARY )
get_target_property ( _library_chk ${_target_shared}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_LIBRARY ${_library_chk} )
endif ( )
endif ( )
if ( TARGET ${_target_static} AND NOT ${_var_prefix}_STATIC )
get_target_property ( _library_chk ${_target_static}
IMPORTED_LOCATION_${_uc_config} )
if ( EXISTS ${_library_chk} )
set ( ${_var_prefix}_STATIC ${_library_chk} )
endif ( )
endif ( )
endforeach ( )

set ( CHOLMOD_CUDA_LIBRARIES ${CHOLMOD_CUDA_LIBRARY} )

macro ( suitesparse_check_exist _var _files )
# ignore generator expressions
string ( GENEX_STRIP "${_files}" _files2 )

foreach ( _file ${_files2} )
if ( NOT EXISTS "${_file}" )
message ( FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist!" )
endif ( )
endforeach ()
endmacro ( )

suitesparse_check_exist ( CHOLMOD_CUDA_LIBRARY ${CHOLMOD_CUDA_LIBRARY} )

message ( STATUS "CHOLMOD_CUDA version: ${CHOLMOD_CUDA_VERSION}" )
message ( STATUS "CHOLMOD_CUDA library: ${CHOLMOD_CUDA_LIBRARY}" )
message ( STATUS "CHOLMOD_CUDA static: ${CHOLMOD_CUDA_STATIC}" )
23 changes: 16 additions & 7 deletions CHOLMOD/Config/cholmod.h.in
Expand Up @@ -102,11 +102,6 @@
#define CHOLMOD_SUB_VERSION @CHOLMOD_VERSION_MINOR@
#define CHOLMOD_SUBSUB_VERSION @CHOLMOD_VERSION_SUB@

/* make it easy for C++ programs to include CHOLMOD */
#ifdef __cplusplus
extern "C" {
#endif

/* ========================================================================== */
/* === Include/cholmod_io64 ================================================= */
/* ========================================================================== */
Expand Down Expand Up @@ -584,6 +579,11 @@ extern "C" {
#define CHOLMOD_AUTO 1 /* select simpl/super depending on matrix */
#define CHOLMOD_SUPERNODAL 2 /* always do supernodal */

/* make it easy for C++ programs to include CHOLMOD */
#ifdef __cplusplus
extern "C" {
#endif

typedef struct cholmod_common_struct
{
/* ---------------------------------------------------------------------- */
Expand Down Expand Up @@ -4596,6 +4596,11 @@ int cholmod_l_super_ltsolve (cholmod_factor *, cholmod_dense *, cholmod_dense *,

#endif

#ifdef __cplusplus
}
#endif


/* ========================================================================== */
/* === Include/cholmod_gpu.h ================================================ */
/* ========================================================================== */
Expand Down Expand Up @@ -4634,6 +4639,11 @@ int cholmod_l_super_ltsolve (cholmod_factor *, cholmod_dense *, cholmod_dense *,

#define CHOLMOD_HANDLE_CUDA_ERROR(e,s) {if (e) {ERROR(CHOLMOD_GPU_PROBLEM,s);}}

/* make it easy for C++ programs to include CHOLMOD */
#ifdef __cplusplus
extern "C" {
#endif

typedef struct cholmod_gpu_pointers
{
double *h_Lx [CHOLMOD_HOST_SUPERNODE_BUFFERS] ;
Expand Down Expand Up @@ -4672,11 +4682,10 @@ void cholmod_l_gpu_end ( cholmod_common *Common ) ;
int cholmod_gpu_allocate ( cholmod_common *Common ) ;
int cholmod_l_gpu_allocate ( cholmod_common *Common ) ;

#endif

#ifdef __cplusplus
}
#endif

#endif

#endif
Binary file modified CHOLMOD/Doc/CHOLMOD_UserGuide.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion CHOLMOD/Doc/CHOLMOD_UserGuide.tex
Expand Up @@ -48,7 +48,7 @@
\end{abstract}
%-------------------------------------------------------------------------------

CHOLMOD Copyright\copyright 2005-2022 by Timothy A. Davis, All Rights Reserved.
CHOLMOD Copyright\copyright 2005-2023 by Timothy A. Davis, All Rights Reserved.
Portions are also copyrighted by William W. Hager (the {\tt Modify} Module),
and the University of Florida (the {\tt Partition} and {\tt Core} Modules).
All Rights Reserved.
Expand Down
11 changes: 11 additions & 0 deletions CHOLMOD/Doc/ChangeLog
@@ -1,3 +1,14 @@
Sept 8, 2023: version 4.2.0

* cmake updates: SuiteSparse:: namespace by Markus Muetzel
* bug fix: typecast was broken in cholmod_postorder.c
* minor fixes to debug scaffolding and test code: cholmod_internal.h,
cholmod_metis_wrapper.c, Tcov/memory.c.
* support for SPQR: minor changes to support SPQR v4.2.0 with 32-bit
integers; no change to user-visible API.
* METIS now using GKRAND: with threadprivate state variables, to
avoid global system lock when using CHOLMON on many user threads

June 16, 2023: version 4.0.4

* cmake build system updates: update by Markus Muetzel
Expand Down
2 changes: 1 addition & 1 deletion CHOLMOD/Doc/cholmod_version.tex
@@ -1,2 +1,2 @@
% version of SuiteSparse/CHOLMOD
\date{VERSION 4.0.4, June 16, 2023}
\date{VERSION 4.2.0, Sept 8, 2023}