Skip to content

Commit

Permalink
[cmake] Bump w2dynamics version to v1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed May 26, 2024
1 parent d9fca21 commit 6a3b4a3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ message(STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------")

# w2dynamics specific variables
get_property(FFTW_LIBRARIES TARGET triqs::fftw PROPERTY INTERFACE_LINK_LIBRARIES)
set(W2DYN_GIT_HASH b52a73f)
set(W2DYN_GIT_HASH v1.1.5)
message(STATUS "w2dynamics git hash: ${W2DYN_GIT_HASH}")

include(FetchContent)
Expand Down
45 changes: 20 additions & 25 deletions w2dynamics.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b72c069..6ccec60 100644
index e8a819a..d45de97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,15 +52,6 @@ SET( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DLAPACK77_Interfac
Expand All @@ -18,7 +18,7 @@ index b72c069..6ccec60 100644
option(USE_NFFT "Compile with support for routines requiring the NFFT library for non-equispaced FFTs" ON)

if (USE_NFFT)
@@ -88,30 +79,14 @@ else ()
@@ -91,22 +82,14 @@ else ()
set(NFFT_LIBRARIES "")
endif ()

Expand All @@ -28,14 +28,6 @@ index b72c069..6ccec60 100644
- if (${ERRORCODE})
- MESSAGE(FATAL_ERROR "Couldn't install numpy -> ABORTING!!!")
- endif()
- install_via_pip("setuptools" ERRORCODE)
- if (${ERRORCODE})
- MESSAGE(FATAL_ERROR "Couldn't install setuptools -> ABORTING!!!")
- endif()
- install_via_pip("meson" ERRORCODE)
- if (${ERRORCODE})
- MESSAGE(FATAL_ERROR "Couldn't install meson -> ABORTING!!!")
- endif()
-ENDIF()
-
find_package(
Expand All @@ -49,21 +41,13 @@ index b72c069..6ccec60 100644
- COMMAND "${PYTHON_EXECUTABLE}" -c
+ COMMAND "${Python_EXECUTABLE}" -c
"import numpy.f2py; print(numpy.f2py.get_include())"
RESULT_VARIABLE GET_INCLUDE_FAILED
OUTPUT_VARIABLE F2PY_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -121,7 +96,7 @@ target_link_libraries(fortranobject PUBLIC Python::NumPy)
@@ -124,42 +107,11 @@ target_link_libraries(fortranobject PUBLIC Python::NumPy)
target_include_directories(fortranobject PUBLIC "${F2PY_INCLUDE_DIR}")
set_property(TARGET fortranobject PROPERTY POSITION_INDEPENDENT_CODE ON)

-find_package(H5PY)
+find_package(H5PY REQUIRED)
find_package(HDF5 1.6 COMPONENTS Fortran)# enforce the availability of the Fortran bindings. FIXME: Test on a suitable computer

if((NOT H5PY_FOUND) AND (NOT HDF5_FOUND))
@@ -147,41 +122,9 @@ include(ExternalProject)
find_package(HDF5 1.6 COMPONENTS Fortran)
endif()

-find_package(MPI4PY)
-find_package(SCIPY 0.10)
-IF(NOT SCIPY_FOUND)
Expand Down Expand Up @@ -99,21 +83,32 @@ index b72c069..6ccec60 100644
- MESSAGE(FATAL_ERROR "Couldn't install configobj(required for DMFT.py) -> ABORTING!!!")
- endif()
-endif()
+find_package(H5PY REQUIRED)
+find_package(HDF5 1.6 COMPONENTS Fortran)# enforce the availability of the Fortran bindings. FIXME: Test on a suitable computer
+find_package(MPI4PY REQUIRED)
+find_package(SCIPY 0.10 REQUIRED)
+find_package(CONFIGOBJ REQUIRED)

# Define the executable name
SET(CTQMCEXE ctqmc)
@@ -226,7 +169,7 @@ message(STATUS "Installation prefix directory (variable CMAKE_INSTALL_PREFIX): $
message(STATUS "Installing executables DMFT.py, cthyb, Maxent.py, hgrep (option INSTALL_EXECUTABLES): ${INSTALL_EXECUTABLES}")
@@ -200,7 +152,7 @@ enable_testing()
message(STATUS "Configuration for installation (optional):")

# default / fallback paths relative to CMAKE_INSTALL_PREFIX
-set(INSTALL_PATH_SITE_PACKAGES "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
+set(INSTALL_PATH_SITE_PACKAGES "lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
set(INSTALL_PATH_SCRIPTS "bin")

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
@@ -246,7 +198,7 @@ option(INSTALL_EXECUTABLES "Install executable scripts DMFT.py, cthyb, Maxent.py
message(STATUS "Installing executable scripts DMFT.py, cthyb, Maxent.py, hgrep (option INSTALL_EXECUTABLES): ${INSTALL_EXECUTABLES}")

install(DIRECTORY w2dyn
- DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages
+ DESTINATION lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages
- DESTINATION "${INSTALL_PATH_SITE_PACKAGES}"
+ DESTINATION ${INSTALL_PATH_SITE_PACKAGES}
COMPONENT Python_Package)
if(INSTALL_EXECUTABLES)
install(PROGRAMS DMFT.py cthyb hgrep Maxent.py
set(SCRIPT_FILES DMFT.py cthyb hgrep Maxent.py)
diff --git a/cmake/Modules/FindCONFIGOBJ.cmake b/cmake/Modules/FindCONFIGOBJ.cmake
index 4f4a9ee..59a81bc 100644
--- a/cmake/Modules/FindCONFIGOBJ.cmake
Expand Down

0 comments on commit 6a3b4a3

Please sign in to comment.