From 3156d2cd812ec1ab7db8ad081c2d5148c92c6905 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Fri, 17 Nov 2023 11:12:49 +0100 Subject: [PATCH] Switch back to w2dynamics upstream repository --- .github/workflows/build.yml | 11 +++---- CMakeLists.txt | 6 ++-- w2dynamics.patch | 57 ------------------------------------- 3 files changed, 8 insertions(+), 66 deletions(-) delete mode 100644 w2dynamics.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 338ad1e..bdf9599 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,12 @@ jobs: python3-sphinx python3-nbsphinx + - name: Set up Python + if: matrix.os == 'macos-12' + uses: actions/setup-python@v4 + with: + python-version: '3.11' # 3.12 removed distutils + - name: Install homebrew dependencies if: matrix.os == 'macos-12' run: | @@ -77,11 +83,6 @@ jobs: run: echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV - - name: add clang cxxflags - if: ${{ contains(matrix.cxx, 'clang') }} - run: - echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV - - name: Build & Install TRIQS env: CC: ${{ matrix.cc }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 57a8986..4981769 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,7 +67,7 @@ message(STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------") # --- Define the w2dynamics interface version numbers and get the git hash -set(W2DYN_GIT_HASH b5a2bcc9ecdb694703a4e683b63352bedf116882) +set(W2DYN_GIT_HASH 5d0d8b28b567d0590071f24e784d048f6d35865a) message(STATUS "w2dynamics git hash: ${W2DYN_GIT_HASH}") # --- Build w2dynamics as an external project @@ -76,8 +76,7 @@ get_property(FFTW_LIBRARIES TARGET triqs::fftw PROPERTY INTERFACE_LINK_LIBRARIES include(ExternalProject) ExternalProject_Add(w2dynamics PREFIX w2dyn_project - #GIT_REPOSITORY https://github.com/w2dynamics/w2dynamics - GIT_REPOSITORY https://github.com/the-hampel/w2dynamics + GIT_REPOSITORY https://github.com/w2dynamics/w2dynamics GIT_TAG ${W2DYN_GIT_HASH} GIT_CONFIG advice.detachedHead=false CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} @@ -86,7 +85,6 @@ ExternalProject_Add(w2dynamics -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DFFTW_LIBRARIES=${FFTW_LIBRARIES} INSTALL_COMMAND "" - PATCH_COMMAND ${TRIQS_GIT_EXECUTABLE} checkout . && ${TRIQS_GIT_EXECUTABLE} apply ${PROJECT_SOURCE_DIR}/w2dynamics.patch ) set(W2DYN_ROOT ${PROJECT_BINARY_DIR}/w2dyn_project/src/w2dynamics) diff --git a/w2dynamics.patch b/w2dynamics.patch deleted file mode 100644 index cdb4e7d..0000000 --- a/w2dynamics.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 67ecb0b..8eea51d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -180,6 +180,9 @@ SET(CMAKE_Fortran_MODULE_DIRECTORY ${LIB}) - ADD_SUBDIRECTORY(${SRCMTRNG} ${LIB}) - - # The source for the ctqmc binary and have it placed in the bin folder -+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") -+ set(F2PY_ENV CFLAGS=-Wno-error=incompatible-function-pointer-types) -+endif() - ADD_SUBDIRECTORY(${SRCCTQMC}) - ADD_SUBDIRECTORY(${SRCMAXENT}) - -diff --git a/cmake/Modules/SetFortranFlags.cmake b/cmake/Modules/SetFortranFlags.cmake -index caab7fc..264978a 100644 ---- a/cmake/Modules/SetFortranFlags.cmake -+++ b/cmake/Modules/SetFortranFlags.cmake -@@ -55,12 +55,6 @@ ENDIF(CMAKE_Fortran_FLAGS_RELEASE AND CMAKE_Fortran_FLAGS_TESTING AND CMAKE_Fort - #SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" - # Fortran "-fno-underscoring") - --# There is some bug where -march=native doesn't work on Mac --IF(APPLE) -- SET(GNUNATIVE "-mtune=native") --ELSE() -- SET(GNUNATIVE "-march=native") --ENDIF() - - #The following does not seem to get added... - SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" -diff --git a/src/ctqmc_fortran/CMakeLists.txt b/src/ctqmc_fortran/CMakeLists.txt -index 44f66a3..2f9ae07 100644 ---- a/src/ctqmc_fortran/CMakeLists.txt -+++ b/src/ctqmc_fortran/CMakeLists.txt -@@ -92,7 +92,7 @@ endif (USE_NFFT) - # output will be a shared library that can be imported by python. - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_name}${F2PY_SUFFIX}" - COMMAND ${CMAKE_COMMAND} -E copy "${SRCCTQMC}/.f2py_f2cmap" "${CMAKE_CURRENT_BINARY_DIR}/.f2py_f2cmap" -- COMMAND ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$:--quiet> -m ${_name} -+ COMMAND ${F2PY_ENV} ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$:--quiet> -m ${_name} - --build-dir "${CMAKE_Fortran_MODULE_DIRECTORY}" - ${_fcompiler_opts} - ${LIB}/libmtrng.a -diff --git a/src/maxent/CMakeLists.txt b/src/maxent/CMakeLists.txt -index cd17611..aa242c4 100644 ---- a/src/maxent/CMakeLists.txt -+++ b/src/maxent/CMakeLists.txt -@@ -69,7 +69,7 @@ set(EXTERNAL_LIBRARIES ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) - set(ADDITIONAL_OPTS -fPIC -DLAPACK77_Interface) - add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_name}${F2PY_SUFFIX}" - COMMAND ${CMAKE_COMMAND} -E copy "${SRCMAXENT}/.f2py_f2cmap" "${CMAKE_CURRENT_BINARY_DIR}/.f2py_f2cmap" -- COMMAND ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$:--quiet> -m ${_name} -+ COMMAND ${F2PY_ENV} ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$:--quiet> -m ${_name} - --build-dir "${CMAKE_Fortran_MODULE_DIRECTORY}" - ${_fcompiler_opts} --opt="${ADDITIONAL_OPTS}" ${_inc_opts} - ${EXTERNAL_LIBRARIES}