Merge pull request #4394 from rbberger/find-package-pace
ml-pace: allow linking to existing pace library
This commit is contained in:
@ -1,12 +1,17 @@
|
||||
# PACE library support for ML-PACE package
|
||||
find_package(pace QUIET)
|
||||
|
||||
if(pace_FOUND)
|
||||
find_package(pace)
|
||||
target_link_libraries(lammps PRIVATE pace::pace)
|
||||
else()
|
||||
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
|
||||
if(POLICY CMP0135)
|
||||
cmake_policy(SET CMP0135 OLD)
|
||||
endif()
|
||||
|
||||
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
|
||||
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
|
||||
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix2.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
|
||||
set(PACELIB_MD5 "a53bd87cfee8b07d9f44bc17aad69c3f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
|
||||
mark_as_advanced(PACELIB_URL)
|
||||
mark_as_advanced(PACELIB_MD5)
|
||||
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)
|
||||
@ -42,9 +47,16 @@ else()
|
||||
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
|
||||
endif()
|
||||
|
||||
# some preinstalled yaml-cpp versions don't provide a namespaced target
|
||||
find_package(yaml-cpp QUIET)
|
||||
if(TARGET yaml-cpp AND NOT TARGET yaml-cpp::yaml-cpp)
|
||||
add_library(yaml-cpp::yaml-cpp ALIAS yaml-cpp)
|
||||
endif()
|
||||
|
||||
add_subdirectory(${lib-pace} build-pace)
|
||||
set_target_properties(pace PROPERTIES CXX_EXTENSIONS ON OUTPUT_NAME lammps_pace${LAMMPS_MACHINE})
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
|
||||
target_link_libraries(lammps PRIVATE pace)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -18,11 +18,11 @@ from install_helpers import fullpath, geturl, checkmd5sum, getfallback
|
||||
# settings
|
||||
|
||||
thisdir = fullpath('.')
|
||||
version ='v.2023.11.25.fix'
|
||||
version ='v.2023.11.25.fix2'
|
||||
|
||||
# known checksums for different PACE versions. used to validate the download.
|
||||
checksums = { \
|
||||
'v.2023.11.25.fix': 'b45de9a633f42ed65422567e3ce56f9f'
|
||||
'v.2023.11.25.fix2': 'a53bd87cfee8b07d9f44bc17aad69c3f'
|
||||
}
|
||||
|
||||
parser = ArgumentParser(prog='Install.py', description="LAMMPS library build wrapper script")
|
||||
|
||||
Reference in New Issue
Block a user