From a9bafef6486042e2fad5a97ea52f317d2db33e9e Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Fri, 9 May 2025 16:38:05 -0400 Subject: [PATCH 1/3] matching wrong if/else and introducing policy handling for CMP0135 --- applications/dmrg/tebd/CMakeLists.txt | 22 +++++++++++----------- config/FindBoostForALPS.cmake | 5 +++++ src/alps/CMakeLists.txt | 5 +++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/applications/dmrg/tebd/CMakeLists.txt b/applications/dmrg/tebd/CMakeLists.txt index f69e70069..cffee7a5e 100644 --- a/applications/dmrg/tebd/CMakeLists.txt +++ b/applications/dmrg/tebd/CMakeLists.txt @@ -36,16 +36,16 @@ if(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) endforeach(_hdf5_def) set_target_properties(tebd PROPERTIES COMPILE_DEFINITIONS "${ALPS_TEBD_DEFINITIONS}") endif(HDF5_DEFINITIONS) -if(ALPS_PYTHON_WHEEL) - install(TARGETS tebd RUNTIME DESTINATION pyalps/bin COMPONENT applications) - if(APPLE) - set_target_properties(tebd PROPERTIES INSTALL_RPATH "@loader_path/../lib" ) - else(APPLE) - set_target_properties(tebd PROPERTIES INSTALL_RPATH "$ORIGIN/../lib" ) - endif(APPLE) -else() - install(TARGETS tebd RUNTIME DESTINATION bin COMPONENT applications) -endif() + if(ALPS_PYTHON_WHEEL) + install(TARGETS tebd RUNTIME DESTINATION pyalps/bin COMPONENT applications) + if(APPLE) + set_target_properties(tebd PROPERTIES INSTALL_RPATH "@loader_path/../lib" ) + else(APPLE) + set_target_properties(tebd PROPERTIES INSTALL_RPATH "$ORIGIN/../lib" ) + endif(APPLE) + else() + install(TARGETS tebd RUNTIME DESTINATION bin COMPONENT applications) + endif() else(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) message(STATUS "tebd will not be built") -endif(LAPACK_FOUND AND ALPS_BUILD_FORTRAN AND HDF5_STATIC_LIBRARIES) +endif(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) diff --git a/config/FindBoostForALPS.cmake b/config/FindBoostForALPS.cmake index d44916b50..7c528aaf0 100644 --- a/config/FindBoostForALPS.cmake +++ b/config/FindBoostForALPS.cmake @@ -30,6 +30,11 @@ if (NOT Boost_SRC_DIR) include(FetchContent) + # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) + endif() + FetchContent_Declare( boost_src URL https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz diff --git a/src/alps/CMakeLists.txt b/src/alps/CMakeLists.txt index d08ecc6bc..fe2bf7f6a 100644 --- a/src/alps/CMakeLists.txt +++ b/src/alps/CMakeLists.txt @@ -192,7 +192,8 @@ if(NOT WIN32 AND NOT APPLE AND NOT ALPS_PYTHON_WHEEL) PROPERTIES SOVERSION "${ALPS_VERSION_MAJOR}" VERSION "${ALPS_VERSION_MAJOR}.${ALPS_VERSION_MINOR}.${ALPS_VERSION_PATCH}" ) -endif(NOT WIN32 AND NOT APPLE) +endif(NOT WIN32 AND NOT APPLE AND NOT ALPS_PYTHON_WHEEL) + #boost librt linking if(NOT WIN32 AND NOT APPLE) @@ -255,4 +256,4 @@ else () ARCHIVE DESTINATION pyalps/lib LIBRARY DESTINATION pyalps/lib RUNTIME DESTINATION pyalps/bin) -endif() \ No newline at end of file +endif() From 5b1bf3749f09a4e2b7b824d30df7a08864aac4df Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Fri, 9 May 2025 16:46:42 -0400 Subject: [PATCH 2/3] Update build.yml An attempt at fixing failing osx pip install --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7a0b0f3e..81b560a15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,7 +72,8 @@ jobs: - name: Install dependencies run: | brew install gcc python@${{ matrix.plat.py_version }} - python${{ matrix.plat.py_version }} -m pip install --upgrade pip --break-system-packages + # pip already exists, pip install fails + # python${{ matrix.plat.py_version }} -m pip install --upgrade pip --break-system-packages pip${{ matrix.plat.py_version }} install numpy==1.26.4 scipy==1.13.0 --break-system-packages brew install openmpi hdf5 wget https://archives.boost.io/release/1.${{ matrix.plat.boost_version }}.0/source/boost_1_${{ matrix.plat.boost_version }}_0.tar.gz From d219c14118987e3232d27414975c396659393221 Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Sun, 11 May 2025 12:34:27 -0400 Subject: [PATCH 3/3] Update build.yml CI upgrade of boost version to 88 --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81b560a15..4a284a43c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: - { os: ubuntu-24.04, target: "", comp_pack: "gcc-14 g++-14", c_compiler: gcc, cxx_compiler: g++, c_version: 14, py_version: "3.12", boost_version: 86} - { os: ubuntu-24.04, target: "", comp_pack: "gcc-13 g++-13", c_compiler: gcc, cxx_compiler: g++, c_version: 13, py_version: "3.12", boost_version: 87} - { os: ubuntu-24.04, target: "", comp_pack: "gcc-14 g++-14", c_compiler: gcc, cxx_compiler: g++, c_version: 14, py_version: "3.12", boost_version: 87} + - { os: ubuntu-24.04, target: "", comp_pack: "gcc-14 g++-14", c_compiler: gcc, cxx_compiler: g++, c_version: 14, py_version: "3.12", boost_version: 88} - { os: ubuntu-22.04, target: "", comp_pack: "clang-13", c_compiler: clang, cxx_compiler: clang++, c_version: 13, py_version: "3.10", boost_version: 81} - { os: ubuntu-22.04, target: "", comp_pack: "clang-14", c_compiler: clang, cxx_compiler: clang++, c_version: 14, py_version: "3.10", boost_version: 81} - { os: ubuntu-22.04, target: "", comp_pack: "clang-15", c_compiler: clang, cxx_compiler: clang++, c_version: 15, py_version: "3.10", boost_version: 81} @@ -33,6 +34,7 @@ jobs: - { os: ubuntu-24.04, target: "", comp_pack: "clang-16", c_compiler: clang, cxx_compiler: clang++, c_version: 16, py_version: "3.12", boost_version: 86} - { os: ubuntu-24.04, target: "", comp_pack: "clang-17", c_compiler: clang, cxx_compiler: clang++, c_version: 17, py_version: "3.12", boost_version: 86} - { os: ubuntu-24.04, target: "", comp_pack: "clang-18", c_compiler: clang, cxx_compiler: clang++, c_version: 18, py_version: "3.12", boost_version: 86} + - { os: ubuntu-24.04, target: "", comp_pack: "clang-18", c_compiler: clang, cxx_compiler: clang++, c_version: 18, py_version: "3.12", boost_version: 88} steps: - uses: actions/checkout@v4 @@ -66,6 +68,7 @@ jobs: # macos-13 is an intel runner, macos-14 is apple silicon plat: - { os: macos-14, target: "", comp_pack: "gcc-14 g++-14", c_compiler: gcc, cxx_compiler: g++, c_version: 14, py_version: "3.12", boost_version: 86} + - { os: macos-15, target: "", comp_pack: "gcc-14 g++-14", c_compiler: gcc, cxx_compiler: g++, c_version: 14, py_version: "3.12", boost_version: 88} steps: - uses: actions/checkout@v4