From 4228c25c08e1795d6b53701f390f5b88d63ad765 Mon Sep 17 00:00:00 2001 From: Tim Davis Date: Fri, 1 Dec 2023 20:35:15 -0600 Subject: [PATCH] lots of diagnostics in UMFPACK/CMakeLists.txt --- UMFPACK/CMakeLists.txt | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/UMFPACK/CMakeLists.txt b/UMFPACK/CMakeLists.txt index 654c2e0c7..7c9cf85d9 100644 --- a/UMFPACK/CMakeLists.txt +++ b/UMFPACK/CMakeLists.txt @@ -30,6 +30,9 @@ project ( umfpack VERSION "${UMFPACK_VERSION_MAJOR}.${UMFPACK_VERSION_MINOR}.${UMFPACK_VERSION_SUB}" LANGUAGES C ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "1: ${dirs}" ) + #------------------------------------------------------------------------------- # SuiteSparse policies #------------------------------------------------------------------------------- @@ -43,6 +46,9 @@ option ( DEMO "ON: Build the demo programs. OFF (default): do not build the dem include ( SuiteSparsePolicy ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "2: ${dirs}" ) + if ( SUITESPARSE_CUDA ) # UMFPACK with CHOLMOD (which can use CUDA) enable_language ( CXX CUDA ) @@ -60,6 +66,9 @@ else ( ) find_package ( OpenMP ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "3: ${dirs}" ) + if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) find_package ( SuiteSparse_config 7.4.0 PATHS ${CMAKE_SOURCE_DIR}/../SuiteSparse_config/build NO_DEFAULT_PATH ) @@ -67,12 +76,18 @@ if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) find_package ( SuiteSparse_config 7.4.0 REQUIRED ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "4: ${dirs}" ) + find_package ( AMD 3.3.0 PATHS ${CMAKE_SOURCE_DIR}/../AMD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::AMD ) find_package ( AMD 3.3.0 REQUIRED ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "5: ${dirs}" ) + if ( DEMO AND NOT WIN32 ) find_package ( COLAMD 3.3.0 PATHS ${CMAKE_SOURCE_DIR}/../COLAMD/build NO_DEFAULT_PATH ) @@ -80,22 +95,34 @@ if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) find_package ( COLAMD 3.3.0 REQUIRED ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "6: ${dirs}" ) + find_package ( CAMD 3.3.0 PATHS ${CMAKE_SOURCE_DIR}/../CAMD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::CAMD ) find_package ( CAMD 3.3.0 REQUIRED ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "7: ${dirs}" ) + find_package ( CCOLAMD 3.3.0 PATHS ${CMAKE_SOURCE_DIR}/../CCOLAMD/build NO_DEFAULT_PATH ) if ( NOT TARGET SuiteSparse::CCOLAMD ) find_package ( CCOLAMD 3.3.0 REQUIRED ) endif ( ) + +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "8: ${dirs}" ) endif ( ) endif ( ) include ( SuiteSparseBLAS ) # requires cmake 3.22 +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "9: ${dirs}" ) + option ( NCHOLMOD "ON: do not use CHOLMOD. OFF (default): use CHOLMOD" OFF ) if ( NOT SUITESPARSE_ROOT_CMAKELISTS AND NOT NCHOLMOD ) @@ -106,6 +133,9 @@ if ( NOT SUITESPARSE_ROOT_CMAKELISTS AND NOT NCHOLMOD ) find_package ( CHOLMOD 5.1.0 ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "10: ${dirs}" ) + if ( NOT CHOLMOD_FOUND ) # CHOLMOD not found so disable it set ( NCHOLMOD true ) @@ -120,6 +150,9 @@ else ( ) message ( STATUS "Using CHOLMOD for addtional pre-ordering options" ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "11: ${dirs}" ) + #------------------------------------------------------------------------------- # configure files #------------------------------------------------------------------------------- @@ -135,17 +168,29 @@ configure_file ( "Config/umfpack_version.tex.in" # include directories #------------------------------------------------------------------------------- +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "12: ${dirs}" ) + include_directories ( Source Include ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "13: ${dirs}" ) + #------------------------------------------------------------------------------- # dynamic umfpack library properties #------------------------------------------------------------------------------- file ( GLOB UMFPACK_SOURCES "Source2/*.c" ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "14: ${dirs}" ) + if ( BUILD_SHARED_LIBS ) add_library ( UMFPACK SHARED ${UMFPACK_SOURCES} ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "15: ${dirs}" ) + set_target_properties ( UMFPACK PROPERTIES VERSION ${UMFPACK_VERSION_MAJOR}.${UMFPACK_VERSION_MINOR}.${UMFPACK_VERSION_SUB} C_STANDARD 11 @@ -155,11 +200,17 @@ if ( BUILD_SHARED_LIBS ) PUBLIC_HEADER "Include/umfpack.h" WINDOWS_EXPORT_ALL_SYMBOLS ON ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "16: ${dirs}" ) + target_include_directories ( UMFPACK INTERFACE $ $ ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "17: ${dirs}" ) + #------------------------------------------------------------------------------- # static umfpack library properties #------------------------------------------------------------------------------- @@ -167,22 +218,34 @@ endif ( ) if ( BUILD_STATIC_LIBS ) add_library ( UMFPACK_static STATIC ${UMFPACK_SOURCES} ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "18: ${dirs}" ) + set_target_properties ( UMFPACK_static PROPERTIES C_STANDARD 11 C_STANDARD_REQUIRED ON OUTPUT_NAME umfpack PUBLIC_HEADER "Include/umfpack.h" ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "19: ${dirs}" ) + if ( MSVC ) set_target_properties ( UMFPACK_static PROPERTIES OUTPUT_NAME umfpack_static ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "20: ${dirs}" ) + target_include_directories ( UMFPACK_static INTERFACE $ $ ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "21: ${dirs}" ) + #------------------------------------------------------------------------------- # add the library dependencies #------------------------------------------------------------------------------- @@ -201,6 +264,9 @@ if ( BUILD_STATIC_LIBS ) endif ( ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "22: ${dirs}" ) + # AMD: if ( BUILD_SHARED_LIBS ) target_link_libraries ( UMFPACK PRIVATE SuiteSparse::AMD ) @@ -215,6 +281,9 @@ if ( BUILD_STATIC_LIBS ) endif ( ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "23: ${dirs}" ) + # CHOLMOD: if ( NOT NCHOLMOD ) # link with CHOLMOD and its dependencies, both required and optional @@ -231,6 +300,9 @@ if ( NOT NCHOLMOD ) endif ( ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "24: ${dirs}" ) + # OpenMP: if ( OPENMP_FOUND ) message ( STATUS "OpenMP C libraries: ${OpenMP_C_LIBRARIES}" ) @@ -247,6 +319,9 @@ if ( OPENMP_FOUND ) include_directories ( ${OpenMP_C_INCLUDE_DIRS} ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "25: ${dirs}" ) + # libm: if ( NOT WIN32 ) if ( BUILD_SHARED_LIBS ) @@ -258,6 +333,9 @@ if ( NOT WIN32 ) endif ( ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "26: ${dirs}" ) + # BLAS: message ( STATUS "BLAS libraries: ${BLAS_LIBRARIES}" ) message ( STATUS "BLAS include: ${BLAS_INCLUDE_DIRS}" ) @@ -271,12 +349,21 @@ if ( BUILD_STATIC_LIBS ) endif ( ) include_directories ( ${BLAS_INCLUDE_DIRS} ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "27: ${dirs}" ) + #------------------------------------------------------------------------------- # UMFPACK installation location #------------------------------------------------------------------------------- +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "28: ${dirs}" ) + include ( CMakePackageConfigHelpers ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "29: ${dirs}" ) + if ( BUILD_SHARED_LIBS ) install ( TARGETS UMFPACK EXPORT UMFPACKTargets @@ -325,6 +412,9 @@ install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/UMFPACKConfigVersion.cmake DESTINATION ${SUITESPARSE_PKGFILEDIR}/cmake/UMFPACK ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "1: ${dirs}" ) + #------------------------------------------------------------------------------- # create pkg-config file #------------------------------------------------------------------------------- @@ -357,6 +447,9 @@ if ( NOT MSVC ) endforeach ( ) endforeach ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "1: ${dirs}" ) + set ( prefix "${CMAKE_INSTALL_PREFIX}" ) set ( exec_prefix "\${prefix}" ) cmake_path ( IS_ABSOLUTE SUITESPARSE_LIBDIR SUITESPARSE_LIBDIR_IS_ABSOLUTE ) @@ -381,6 +474,9 @@ if ( NOT MSVC ) DESTINATION ${SUITESPARSE_PKGFILEDIR}/pkgconfig ) endif ( ) +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "1: ${dirs}" ) + #------------------------------------------------------------------------------- # Demo library and programs #------------------------------------------------------------------------------- @@ -465,6 +561,9 @@ endif ( ) # report status #------------------------------------------------------------------------------- +get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message ( STATUS "1: ${dirs}" ) + if ( NOT SUITESPARSE_ROOT_CMAKELISTS ) include ( SuiteSparseReport ) endif ( )