Skip to content

Commit

Permalink
Switch back to w2dynamics upstream repository
Browse files Browse the repository at this point in the history
  • Loading branch information
hmenke committed Nov 21, 2023
1 parent 136ad0d commit a3c1f5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 48 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand Down
40 changes: 0 additions & 40 deletions w2dynamics.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
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
Expand All @@ -29,29 +15,3 @@ index caab7fc..264978a 100644

#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 $<$<CONFIG:RELEASE>:--quiet> -m ${_name}
+ COMMAND ${F2PY_ENV} ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$<CONFIG:RELEASE>:--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 $<$<CONFIG:RELEASE>:--quiet> -m ${_name}
+ COMMAND ${F2PY_ENV} ${PYTHON_EXECUTABLE} -m numpy.f2py -c $<$<CONFIG:RELEASE>:--quiet> -m ${_name}
--build-dir "${CMAKE_Fortran_MODULE_DIRECTORY}"
${_fcompiler_opts} --opt="${ADDITIONAL_OPTS}" ${_inc_opts}
${EXTERNAL_LIBRARIES}

0 comments on commit a3c1f5b

Please sign in to comment.