Unverified Commit e8289b00 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'find-kim-fix' of https://github.com/ellio167/lammps into collected-small-changes

parents 3070a110 47b74379
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -36,14 +36,23 @@
# KIM-API-CMAKE_CXX_COMPILER
# KIM-API-CMAKE_Fortran_COMPILER
#
find_package(PkgConfig REQUIRED)

if(KIM-API_FIND_QUIETLY)
  set(REQ_OR_QUI "QUIET")
else()
  set(REQ_OR_QUI "REQUIRED")
endif()

find_package(PkgConfig ${REQ_OR_QUI})
include(FindPackageHandleStandardArgs)

pkg_check_modules(KIM-API REQUIRED libkim-api>=2.0)
pkg_check_modules(KIM-API ${REQ_OR_QUI} libkim-api>=2.0)

pkg_get_variable(KIM-API-V2-CMAKE_C_COMPILER libkim-api CMAKE_C_COMPILER)
pkg_get_variable(KIM-API-V2-CMAKE_CXX_COMPILER libkim-api CMAKE_CXX_COMPILER)
pkg_get_variable(KIM-API-V2_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
if(KIM-API_FOUND)
  pkg_get_variable(KIM-API-CMAKE_C_COMPILER libkim-api CMAKE_C_COMPILER)
  pkg_get_variable(KIM-API-CMAKE_CXX_COMPILER libkim-api CMAKE_CXX_COMPILER)
  pkg_get_variable(KIM-API_CMAKE_Fortran_COMPILER libkim-api CMAKE_Fortran_COMPILER)
endif()

# handle the QUIETLY and REQUIRED arguments and set KIM-API_FOUND to TRUE
# if all listed variables are TRUE
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Designed for use with the kim-api-v2-2.0.0 (and newer) package
   Designed for use with the kim-api-2.0.2 (and newer) package
------------------------------------------------------------------------- */

#include <mpi.h>
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Designed for use with the kim-api-v2-2.0.0 (and newer) package
   Designed for use with the kim-api-2.0.2 (and newer) package
------------------------------------------------------------------------- */

#ifdef COMMAND_CLASS
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Designed for use with the kim-api-v2-2.0.0 (and newer) package
   Designed for use with the kim-api-2.0.2 (and newer) package
------------------------------------------------------------------------- */

#include <cstring>
@@ -313,7 +313,7 @@ void PairKIM::settings(int narg, char **arg)
                        (0 == strcmp("LAMMPSvirial", arg[0]))))
     {
       error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported with "
                  "kim-api-v2.");
                  "kim-api.");
     }
     else
       error->all(FLERR,"Illegal pair_style command");
+3 −3
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Designed for use with the kim-api-v2-2.0.0 (and newer) package
   Designed for use with the kim-api-2.0.2 (and newer) package
------------------------------------------------------------------------- */

#ifdef PAIR_CLASS
@@ -182,9 +182,9 @@ E: KIM Compute returned error

The KIM model was unable, for some reason, to complete the computation.

E: 'KIMvirial' or 'LAMMPSvirial' not supported with kim-api-v2.
E: 'KIMvirial' or 'LAMMPSvirial' not supported with kim-api.

"KIMvirial or "LAMMPSvirial" found on the pair_style line.  These keys are not supported kim-api-v2. (The virial computation is always performed by LAMMPS.) Please remove these keys, make sure the KIM model you are using supports kim-api-v2, and rerun.
"KIMvirial or "LAMMPSvirial" found on the pair_style line.  These keys are not supported kim-api. (The virial computation is always performed by LAMMPS.) Please remove these keys, make sure the KIM model you are using supports kim-api, and rerun.

E: Illegal pair_style command

Loading