Intermediate patch for SIRIUS 7.6.1 and Libxc >=7

until a new SIRIUS release is available
This commit is contained in:
Matthias Krack 2024-12-29 17:15:43 +01:00
parent b5a03abc68
commit 0d129a2bb0
2 changed files with 19 additions and 0 deletions

View file

@ -119,6 +119,9 @@ case "$with_sirius" in
# https://github.com/electronic-structure/SIRIUS/issues/854
sed -i'' -e '1s/.*/#include <cstdint>\n&/' src/*.hpp
# Patch SIRIUS 7.6.1 for Libxc 7.0.0
patch -p1 src/potential/xc_functional_base.hpp <${SCRIPT_DIR}/stage8/sirius_libxc7.patch
rm -Rf build
mkdir build
cd build

View file

@ -0,0 +1,16 @@
--- a/src/potential/xc_functional_base.hpp
+++ b/src/potential/xc_functional_base.hpp
@@ -15,6 +15,13 @@
#define __XC_FUNCTIONAL_BASE_HPP__
#include <xc.h>
+
+/* libxc >= 7 split the functional definition in a different file from xc.h */
+
+#if (XC_MAJOR_VERSION >= 7)
+#include <xc_funcs.h>
+#endif
+
#include <string.h>
#include <memory>
#include <map>