Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ endif()
include(FindOrFetchMADWorld)
detect_MADNESS_configuration()
include(external/eigen.cmake)
# the FetchContent-based version will not work due to BLT target name conflicts
# include(FindOrFetchUmpire)
# use the ExternalProject-based version
include(external/umpire.cmake)

###### discover linear algebra
Expand Down Expand Up @@ -344,7 +347,7 @@ endif(ENABLE_WFN91_LINALG_DISCOVERY_KIT)
include(FindOrFetchBTAS)
include(FindOrFetchBoost)
if(ENABLE_SCALAPACK)
include(external/scalapack.cmake)
include(FindOrFetchScaLAPACK)
endif()
if (TA_ENABLE_RANGEV3)
include(FindOrFetchRangeV3)
Expand Down
37 changes: 0 additions & 37 deletions cmake/modules/DownloadProject.CMakeLists.cmake.in

This file was deleted.

202 changes: 0 additions & 202 deletions cmake/modules/DownloadProject.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion cmake/modules/FindOrFetchBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (NOT TARGET Boost::boost)

# current boost-cmake/master does not install boost correctly, so warn that installed TiledArray will not be usable
# boost-cmake/install_rules https://github.com/Orphis/boost-cmake/pull/45 is supposed to fix it but is inactive
message(WARNING "Building Boost from source makes TiledArray unusable from the install location! Install TA using package manager or manually and reconfigure/reinstall TiledArray to fix this")
message(WARNING "Building Boost from source makes TiledArray unusable from the install location! Install Boost using package manager or manually and reconfigure/reinstall TiledArray to fix this")
export(EXPORT tiledarray
FILE "${PROJECT_BINARY_DIR}/boost-targets.cmake")
install(EXPORT tiledarray
Expand Down
3 changes: 3 additions & 0 deletions cmake/modules/FindOrFetchMADWorld.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ if (NOT TARGET MADworld)
# force 'all' target to build madness and MADworld using this dummy target
add_custom_target(tiledarray-force-all-to-build-madness-target ALL DEPENDS madness MADworld)

# set MADNESS_CONFIG to the install location so that we know where to find it
set(MADNESS_CONFIG ${CMAKE_INSTALL_PREFIX}/${MADNESS_INSTALL_CMAKEDIR}/madness-config.cmake)

endif(NOT TARGET MADworld)

# postcond check
Expand Down
File renamed without changes.
36 changes: 36 additions & 0 deletions cmake/modules/FindOrFetchUmpire.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# try find_package
if (NOT TARGET umpire)
include (FindPackageRegimport)
find_package_regimport(umpire QUIET CONFIG)
if (TARGET umpire)
message(STATUS "Found umpire CONFIG at ${umpire_CONFIG}")
endif (TARGET umpire)
endif (NOT TARGET umpire)

# if not found, build via FetchContent
if (NOT TARGET umpire)

include(FetchContent)
FetchContent_Declare(
umpire
GIT_REPOSITORY https://github.com/LLNL/Umpire.git
GIT_TAG ${TA_TRACKED_UMPIRE_TAG}
)
FetchContent_MakeAvailable(umpire)
FetchContent_GetProperties(umpire
SOURCE_DIR UMPIRE_SOURCE_DIR
BINARY_DIR UMPIRE_BINARY_DIR
)

# set BTAS_CONFIG to the install location so that we know where to find it
set(umpire_CONFIG ${CMAKE_INSTALL_PREFIX}/${UMPIRE_CMAKE_DIR}/umpire-config.cmake)

# install umpire
install(TARGETS umpire umpire_alloc EXPORT tiledarray COMPONENT tiledarray )

endif(NOT TARGET umpire)

# postcond check
if (NOT TARGET umpire)
message(FATAL_ERROR "FindOrFetchUmpire could not make umpire target available")
endif(NOT TARGET umpire)
3 changes: 1 addition & 2 deletions examples/scalapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ foreach(_exec conversion evp)

# Add executable
add_executable(scalapack-${_exec} EXCLUDE_FROM_ALL ${_exec}.cpp)
target_link_libraries(scalapack-${_exec} PRIVATE tiledarray ${MADNESS_DISABLEPIE_LINKER_FLAG})
add_dependencies(scalapack-${_exec} External-tiledarray)
target_link_libraries(scalapack-${_exec} PRIVATE tiledarray)
add_dependencies(examples-tiledarray scalapack-${_exec})

endforeach()
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ TiledArray/math/linalg/rank-local.cpp
)

# the list of libraries on which TiledArray depends on, will be cached later
# when FetchContent umpire: set(_TILEDARRAY_DEPENDENCIES MADworld TiledArray_Eigen BTAS::BTAS blaspp_headers umpire)
set(_TILEDARRAY_DEPENDENCIES MADworld TiledArray_Eigen BTAS::BTAS blaspp_headers TiledArray_UMPIRE)

# TODO better ways to handle tiledarray cuda dependency
Expand Down