Skip to content

Commit d1c511c

Browse files
authored
Build: add support to libxc 6 (#1932)
1 parent 0b1beb7 commit d1c511c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,12 @@ if(DEFINED Libxc_DIR)
367367
set(ENABLE_LIBXC ON)
368368
endif()
369369
if(ENABLE_LIBXC)
370-
find_package(Libxc 5.1.7 REQUIRED HINTS ${Libxc_DIR}/share/cmake/Libxc ${Libxc_DIR}/lib/cmake/Libxc)
370+
find_package(Libxc HINTS ${Libxc_DIR}/share/cmake/Libxc ${Libxc_DIR}/lib/cmake/Libxc)
371371
if(${Libxc_FOUND})
372372
message(STATUS "Found Libxc: version " ${Libxc_VERSION})
373+
if(${Libxc_VERSION} VERSION_LESS 5.1.7)
374+
message(FATAL_ERROR "LibXC >= 5.1.7 is required; found ${Libxc_VERSION}")
375+
endif()
373376
target_link_libraries(${ABACUS_BIN_NAME} Libxc::xc)
374377
include_directories(${Libxc_INCLUDE_DIRS})
375378
add_compile_definitions(USE_LIBXC)

0 commit comments

Comments
 (0)