Commit 29073f7d authored by Stan Moore's avatar Stan Moore
Browse files

Merge branch 'team' into comm_squash

parents 85a14ebc 38c6c190
Loading
Loading
Loading
Loading
+19 −13
Changes for cmake/CMakeLists.txt: 19 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -656,28 +656,34 @@ if(PKG_USER-VTK)
endif()

if(PKG_KIM)
  option(DOWNLOAD_KIM "Download KIM-API v1 from OpenKIM instead of using an already installed one)" OFF)
  option(DOWNLOAD_KIM "Download KIM-API v2 from OpenKIM instead of using an already installed one" OFF)
  if(DOWNLOAD_KIM)
    message(STATUS "KIM-API v1 download requested - we will build our own")
    message(STATUS "KIM-API v2 download requested - we will build our own")
    enable_language(C)
    enable_language(Fortran)
    include(ExternalProject)
    ExternalProject_Add(kim_build
      URL https://github.com/openkim/kim-api/archive/v1.9.5.tar.gz
      URL_MD5 9f66efc128da33039e30659f36fc6d00
      BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
      URL https://s3.openkim.org/kim-api/kim-api-v2-2.0.0.txz
      URL_MD5 1ff8f563ad5991f7a2a25b35a13d7308
      BINARY_DIR build
      CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
                 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
      )
    ExternalProject_get_property(kim_build INSTALL_DIR)
    set(KIM_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v1)
    set(KIM_LIBRARIES ${INSTALL_DIR}/lib/libkim-api-v1.so)
    set(KIM-API-V2_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api-v2)
    set(KIM-API-V2_LDFLAGS ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libkim-api-v2${CMAKE_SHARED_LIBRARY_SUFFIX})
    list(APPEND LAMMPS_DEPS kim_build)
  else()
    find_package(KIM)
    if(NOT KIM_FOUND)
      message(FATAL_ERROR "KIM-API v1 not found, help CMake to find it by setting KIM_LIBRARY and KIM_INCLUDE_DIR, or set DOWNLOAD_KIM=ON to download it")
    find_package(KIM-API-V2)
    if(NOT KIM-API-V2_FOUND)
      message(FATAL_ERROR "KIM-API v2 not found, help CMake to find it by setting PKG_CONFIG_PATH, or set DOWNLOAD_KIM=ON to download it")
    endif()
  endif()
  list(APPEND LAMMPS_LINK_LIBS ${KIM_LIBRARIES})
  include_directories(${KIM_INCLUDE_DIRS})
  list(APPEND LAMMPS_LINK_LIBS "${KIM-API-V2_LDFLAGS}")
  include_directories(${KIM-API-V2_INCLUDE_DIRS})
endif()

if(PKG_MESSAGE)
+50 −0
Changes for cmake/Modules/FindKIM-API-V2.cmake: 50 added lines, 0 removed lines.
Original line number Diff line number Diff line
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the Common Development
# and Distribution License Version 1.0 (the "License").
#
# You can obtain a copy of the license at
# http://www.opensource.org/licenses/CDDL-1.0.  See the License for the
# specific language governing permissions and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each file and
# include the License file in a prominent location with the name LICENSE.CDDL.
# If applicable, add the following below this CDDL HEADER, with the fields
# enclosed by brackets "[]" replaced with your own identifying information:
#
# Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
#
# CDDL HEADER END
#

#
# Copyright (c) 2013--2018, Regents of the University of Minnesota.
# All rights reserved.
#
# Contributors:
#    Richard Berger
#    Christoph Junghans
#    Ryan S. Elliott
#

# - Find KIM-API-V2
#
# sets standard pkg_check_modules variables plus:
#
# KIM-API-V2-CMAKE_C_COMPILER
# KIM-API-V2-CMAKE_CXX_COMPILER
# KIM-API-V2-CMAKE_Fortran_COMPILER
#
find_package(PkgConfig REQUIRED)
include(FindPackageHandleStandardArgs)

pkg_check_modules(KIM-API-V2 REQUIRED libkim-api-v2>=2.0)

pkg_get_variable(KIM-API-V2-CMAKE_C_COMPILER libkim-api-v2 CMAKE_C_COMPILER)
pkg_get_variable(KIM-API-V2-CMAKE_CXX_COMPILER libkim-api-v2 CMAKE_CXX_COMPILER)
pkg_get_variable(KIM-API-V2_CMAKE_Fortran_COMPILER libkim-api-v2 CMAKE_Fortran_COMPILER)

# handle the QUIETLY and REQUIRED arguments and set KIM-API-V2_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(KIM-API-V2 REQUIRED_VARS KIM-API-V2_LIBRARIES)

cmake/Modules/FindKIM.cmake

deleted100644 → 0
+0 −22
Changes for cmake/Modules/FindKIM.cmake: 0 added lines, 22 removed lines.
Original line number Diff line number Diff line
# - Find kim
# Find the native KIM headers and libraries.
#
#  KIM_INCLUDE_DIRS - where to find kim.h, etc.
#  KIM_LIBRARIES    - List of libraries when using kim.
#  KIM_FOUND        - True if kim found.
#

find_path(KIM_INCLUDE_DIR KIM_API.h PATH_SUFFIXES kim-api-v1)

find_library(KIM_LIBRARY NAMES kim-api-v1)

set(KIM_LIBRARIES ${KIM_LIBRARY})
set(KIM_INCLUDE_DIRS ${KIM_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set KIM_FOUND to TRUE
# if all listed variables are TRUE

find_package_handle_standard_args(KIM DEFAULT_MSG KIM_LIBRARY KIM_INCLUDE_DIR)

mark_as_advanced(KIM_INCLUDE_DIR KIM_LIBRARY )
+1 −0
Changes for doc/.gitignore: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
/old
/html
/latex
/spelling
+46 −11
Changes for doc/Makefile: 46 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  html       create HTML doc pages in html dir"
	@echo "  pdf        create Developer.pdf and Manual.pdf in this dir"
	@echo "  old        create old-style HTML doc pages in old dir"
	@echo "  old        create old-style HTML doc pages and Manual.pdf in old dir"
	@echo "  fetch      fetch HTML and PDF files from LAMMPS web site"
	@echo "  epub       create ePUB format manual for e-book readers"
	@echo "  mobi       convert ePUB to MOBI format manual for e-book readers (e.g. Kindle)"
@@ -56,7 +56,7 @@ clean-all: clean
	rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe

clean:
	rm -rf $(RSTDIR) html old epub
	rm -rf $(RSTDIR) html old epub latex
	rm -rf spelling

clean-spelling:
@@ -115,21 +115,44 @@ mobi: epub
	@ebook-convert LAMMPS.epub LAMMPS.mobi
	@echo "Conversion finished. The MOBI manual file is created."

pdf: utils/txt2html/txt2html.exe
pdf: $(OBJECTS) $(ANCHORCHECK)
	@(\
                . $(VENV)/bin/activate ;\
                cp -r src/* $(RSTDIR)/ ;\
                sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
                echo "############################################" ;\
                doc_anchor_check src/*.txt ;\
                echo "############################################" ;\
                deactivate ;\
	)
	@cd latex && \
          sed 's/latexmk -pdf -dvi- -ps-/pdflatex/g' Makefile > temp && \
	  mv temp Makefile && \
	  sed 's/\\begin{equation}//g' LAMMPS.tex > tmp.tex && \
	  mv tmp.tex LAMMPS.tex && \
	  sed 's/\\end{equation}//g' LAMMPS.tex > tmp.tex && \
	  mv tmp.tex LAMMPS.tex && \
	  make && \
	  make && \
	  mv LAMMPS.pdf ../Manual.pdf && \
	  cd ../; 
	@(\
		set -e; \
		cd src/Developer; \
		pdflatex developer; \
		pdflatex developer; \
		mv developer.pdf ../../Developer.pdf; \
		cd ..; \
		../utils/txt2html/txt2html.exe -b *.txt; \
		htmldoc --batch lammps.book;          \
		for s in `echo *.txt | sed -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \
			do grep -q ^$$s lammps.book || \
			echo WARNING: doc file $$s missing in src/lammps.book; done; \
		rm *.html; \
		cd ../../; \
	)
	@rm -rf latex/_sources
	@rm -rf latex/PDF
	@rm -rf latex/USER
	@cp -r src/PDF latex/PDF
	@cp -r src/USER latex/USER
	@rm -rf latex/PDF/.[sg]*
	@rm -rf latex/USER/.[sg]*
	@rm -rf latex/USER/*/.[sg]*
	@rm -rf latex/USER/*/*.[sg]*
	@echo "Build finished. Manual.pdf and Developer.pdf are in this directory."

old: utils/txt2html/txt2html.exe
	@rm -rf old
@@ -139,6 +162,18 @@ old: utils/txt2html/txt2html.exe
	  cp Eqs/*.jpg ../old/Eqs; \
	  cp JPG/* ../old/JPG; \
	  cp PDF/* ../old/PDF;
	@(      set -e;\
		cd src/Developer; \
		pdflatex developer; \
		pdflatex developer; \
		mv developer.pdf ../../old/Developer.pdf; \
		cd ../../old; \
	        for s in `echo ../src/*.txt | sed -e 's,\.\./src/,,g' -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \
			do grep -q ^$$s ../src/lammps.book || \
			echo WARNING: doc file $$s missing in src/lammps.book; done; \
		htmldoc --batch ../src/lammps.book;          \
	)


fetch:
	@rm -rf html_www Manual_www.pdf Developer_www.pdf
Loading