diff --git a/INSTALL.md b/INSTALL.md index 5be4905635..bb597336e4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -40,7 +40,7 @@ Both methods are supported. However, for most users we _strongly_ recommend to b - Boost.Container: header-only - Boost.Test: header-only or (optionally) as a compiled library, *only used for unit testing* - Boost.Range: header-only, *only used for unit testing* -- [BTAS](http://github.com/ValeevGroup/BTAS), tag fba66ad9881ab29ea8df49ac6a6006cab3fb3ce5 . If usable BTAS installation is not found, TiledArray will download and compile +- [BTAS](http://github.com/ValeevGroup/BTAS), tag 2917aa21465a93ae6f399874f247b5fe31d6b693 . If usable BTAS installation is not found, TiledArray will download and compile BTAS from source. *This is the recommended way to compile BTAS for all users*. - [MADNESS](https://github.com/m-a-d-n-e-s-s/madness), tag 0b44ef319643cb9721fbe17d294987c146e6460e . Only the MADworld runtime and BLAS/LAPACK C API component of MADNESS is used by TiledArray. diff --git a/cmake/modules/FindOrFetchBoost.cmake b/cmake/modules/FindOrFetchBoost.cmake index c63bdd0819..6ddb2a3b8d 100644 --- a/cmake/modules/FindOrFetchBoost.cmake +++ b/cmake/modules/FindOrFetchBoost.cmake @@ -5,6 +5,16 @@ endif() # try find_package if (NOT TARGET Boost::boost) + + # detect which Boost targets I already have + foreach(tgt boost;headers;${Boost_BTAS_DEPS_LIBRARIES}) + if (TARGET Boost::${tgt}) + set(ta_imported_boost_${tgt} 0) + else() + set(ta_imported_boost_${tgt} 1) + endif() + endforeach() + include(FindPackageRegimport) find_package_regimport(Boost ${TA_TRACKED_BOOST_VERSION} QUIET) if (TARGET Boost::boost) @@ -14,7 +24,7 @@ if (NOT TARGET Boost::boost) # Boost::* targets by default are not GLOBAL, so to allow users of TA to safely use them we need to make them global # more discussion here: https://gitlab.kitware.com/cmake/cmake/-/issues/17256 foreach(tgt boost;headers;${Boost_BTAS_DEPS_LIBRARIES}) - if (TARGET Boost::${tgt}) + if (TARGET Boost::${tgt} AND ta_imported_boost_${tgt}) get_target_property(_boost_tgt_${tgt}_is_imported_global Boost::${tgt} IMPORTED_GLOBAL) if (NOT _boost_tgt_${tgt}_is_imported_global) set_target_properties(Boost::${tgt} PROPERTIES IMPORTED_GLOBAL TRUE) diff --git a/external/.gitignore b/external/.gitignore deleted file mode 100644 index 3dfc5d72aa..0000000000 --- a/external/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -src/ -build/ diff --git a/external/versions.cmake b/external/versions.cmake index 4518827d2d..ea25d3b1c6 100644 --- a/external/versions.cmake +++ b/external/versions.cmake @@ -24,8 +24,8 @@ set(TA_TRACKED_MADNESS_PREVIOUS_TAG 29a2bf3d3c2670c608b7bfdf2299d76fbc20e041) set(TA_TRACKED_MADNESS_VERSION 0.10.1) set(TA_TRACKED_MADNESS_PREVIOUS_VERSION 0.10.1) -set(TA_TRACKED_BTAS_TAG fba66ad9881ab29ea8df49ac6a6006cab3fb3ce5) -set(TA_TRACKED_BTAS_PREVIOUS_TAG f7c9385348ea87202a887504e2be8bc477efdc3f) +set(TA_TRACKED_BTAS_TAG 2917aa21465a93ae6f399874f247b5fe31d6b693) +set(TA_TRACKED_BTAS_PREVIOUS_TAG fba66ad9881ab29ea8df49ac6a6006cab3fb3ce5) set(TA_TRACKED_LIBRETT_TAG 68abe31a9ec6fd2fd9ffbcd874daa80457f947da) set(TA_TRACKED_LIBRETT_PREVIOUS_TAG 7e27ac766a9038df6aa05613784a54a036c4b796)