Merge pull request #912 from ellio167/kim-update

Update to kim-api-v1.9.5
This commit is contained in:
Steve Plimpton
2018-05-14 16:16:18 -06:00
committed by GitHub
2 changed files with 11 additions and 7 deletions

View File

@ -373,13 +373,12 @@ if(PKG_USER-VTK)
endif() endif()
if(PKG_KIM) if(PKG_KIM)
find_package(KIM QUIET) option(DOWNLOAD_KIM "Download kim-api (instead of using the system's one)" OFF)
if(NOT KIM_FOUND) if(DOWNLOAD_KIM)
message(STATUS "KIM not found - we will build our own")
include(ExternalProject) include(ExternalProject)
ExternalProject_Add(kim_build ExternalProject_Add(kim_build
URL https://github.com/openkim/kim-api/archive/v1.9.4.tar.gz URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
URL_MD5 f4d35a1705eed46d64c7c0ab448ff3e0 URL_MD5 9f66efc128da33039e30659f36fc6d00
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
) )
@ -387,6 +386,11 @@ if(PKG_KIM)
set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1) set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so) set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
list(APPEND LAMMPS_DEPS kim_build) list(APPEND LAMMPS_DEPS kim_build)
else()
find_package(KIM)
if(NOT KIM_FOUND)
message(FATAL_ERROR "KIM not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it")
endif()
endif() endif()
list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES}) list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES})
include_directories(${KIM_INCLUDE_DIRS}) include_directories(${KIM_INCLUDE_DIRS})

View File

@ -21,7 +21,7 @@ Syntax from lib dir: python Install.py -b -v version -a kim-name
specify one or more options, order does not matter specify one or more options, order does not matter
-v = version of KIM API library to use -v = version of KIM API library to use
default = kim-api-v1.9.4 (current as of Apr 2018) default = kim-api-v1.9.5 (current as of May 2018)
-b = download and build base KIM API library with example Models -b = download and build base KIM API library with example Models
this will delete any previous installation in the current folder this will delete any previous installation in the current folder
-n = do NOT download and build base KIM API library. -n = do NOT download and build base KIM API library.
@ -109,7 +109,7 @@ nargs = len(args)
if nargs == 0: error() if nargs == 0: error()
thisdir = os.environ['PWD'] thisdir = os.environ['PWD']
version = "kim-api-v1.9.4" version = "kim-api-v1.9.5"
buildflag = False buildflag = False
everythingflag = False everythingflag = False