From 09046ad3f7ff8edc3a015a2f08631ecfc6c90ae7 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Sat, 12 May 2018 10:08:09 -0500 Subject: [PATCH 1/3] Update to kim-api-v1.9.5 Fixes the 'everything' option --- lib/kim/Install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index 3f1d9fb191..d098250906 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -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 -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 this will delete any previous installation in the current folder -n = do NOT download and build base KIM API library. @@ -109,7 +109,7 @@ nargs = len(args) if nargs == 0: error() thisdir = os.environ['PWD'] -version = "kim-api-v1.9.4" +version = "kim-api-v1.9.5" buildflag = False everythingflag = False From 6b73e29f647df79df626ad7308a5dedc7bf07739 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 12 May 2018 09:43:13 -0600 Subject: [PATCH 2/3] cmake: update kim to v1.9.5 --- cmake/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d7fb090e4a..34b582af23 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -375,8 +375,8 @@ if(PKG_KIM) message(STATUS "KIM not found - we will build our own") include(ExternalProject) ExternalProject_Add(kim_build - URL https://github.com/openkim/kim-api/archive/v1.9.4.tar.gz - URL_MD5 f4d35a1705eed46d64c7c0ab448ff3e0 + URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz + URL_MD5 9f66efc128da33039e30659f36fc6d00 BUILD_IN_SOURCE 1 CONFIGURE_COMMAND /configure --prefix= ) From 55d8cc034119d3863f6812594b793d42fe3b0e4d Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 12 May 2018 09:48:15 -0600 Subject: [PATCH 3/3] cmake: add DOWNLOAD_KIM option --- cmake/CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 34b582af23..cdd9491129 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -370,9 +370,8 @@ if(PKG_USER-VTK) endif() if(PKG_KIM) - find_package(KIM QUIET) - if(NOT KIM_FOUND) - message(STATUS "KIM not found - we will build our own") + option(DOWNLOAD_KIM "Download kim-api (instead of using the system's one)" OFF) + if(DOWNLOAD_KIM) include(ExternalProject) ExternalProject_Add(kim_build URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz @@ -384,6 +383,11 @@ if(PKG_KIM) set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1) set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so) 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() list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES}) include_directories(${KIM_INCLUDE_DIRS})