Commit 489b7eb2 authored by Richard Berger's avatar Richard Berger
Browse files

Merge branch 'master' into adaptglok

parents 4859f3e5 738f155c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -53,14 +53,14 @@ include(CheckCCompilerFlag)
include(CheckIncludeFileCXX)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict -std=c++11")
endif()

option(DISABLE_CXX11_REQUIREMENT "Disable check that requires C++11 for compiling LAMMPS" OFF)
if(DISABLE_CXX11_REQUIREMENT)
  add_definitions(-DLAMMPS_CXX98)
else()
  set(CMAKE_CXX_STANDARD 11)
# else()
#  set(CMAKE_CXX_STANDARD 11)
endif()

# GNU compiler features
@@ -248,6 +248,7 @@ if(BUILD_OMP)
endif()

if(PKG_MSCG OR PKG_USER-ATC OR PKG_USER-AWPMD OR PKG_USER-QUIP OR PKG_LATTE)
  enable_language(C)
  find_package(LAPACK)
  find_package(BLAS)
  if(NOT LAPACK_FOUND OR NOT BLAS_FOUND)
+3 −20
Original line number Diff line number Diff line
@@ -9,9 +9,7 @@ if(BUILD_DOC)

  set(VIRTUALENV ${PYTHON_EXECUTABLE} -m virtualenv)

  file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.txt)
  file(GLOB PDF_EXTRA_SOURCES ${LAMMPS_DOC_DIR}/src/lammps_commands*.txt ${LAMMPS_DOC_DIR}/src/lammps_support.txt ${LAMMPS_DOC_DIR}/src/lammps_tutorials.txt)
  list(REMOVE_ITEM DOC_SOURCES ${PDF_EXTRA_SOURCES})
  file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.rst)

  add_custom_command(
    OUTPUT docenv
@@ -28,25 +26,10 @@ if(BUILD_DOC)
    COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
  )

  set(RST_FILES "")
  set(RST_DIR ${CMAKE_BINARY_DIR}/rst)
  file(MAKE_DIRECTORY ${RST_DIR})
  foreach(TXT_FILE ${DOC_SOURCES})
    get_filename_component(FILENAME ${TXT_FILE} NAME_WE)
    set(RST_FILE ${RST_DIR}/${FILENAME}.rst)
    list(APPEND RST_FILES ${RST_FILE})
    add_custom_command(
      OUTPUT ${RST_FILE}
      DEPENDS requirements.txt docenv ${TXT_FILE}
      COMMAND ${DOCENV_BINARY_DIR}/txt2rst -o ${RST_DIR} ${TXT_FILE}
    )
  endforeach()

  add_custom_command(
    OUTPUT html
    DEPENDS ${RST_FILES}
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src ${RST_DIR}
    COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${RST_DIR} html
    DEPENDS ${DOC_SOURCES} docenv requirements.txt
    COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${LAMMPS_DOC_DIR}/src html
  )

  add_custom_target(
+3 −0
Original line number Diff line number Diff line
if(PKG_MESSAGE)
  if(LAMMPS_SIZES STREQUAL BIGBIG)
    message(FATAL_ERROR "The MESSAGE Package is not compatible with -DLAMMPS_BIGBIG")
  endif()
  option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF)
  file(GLOB_RECURSE cslib_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.F
      ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.c
+4 −0
Original line number Diff line number Diff line
if(PKG_USER-MOLFILE)
  if (CMAKE_VERSION VERSION_LESS "3.10") # due to INTERFACE without a library
    message(FATAL_ERROR "For configuring USER-MOLFILE you need CMake 3.10 or later")
  endif()

  set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
  add_library(molfile INTERFACE)
  target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
+2 −2
Original line number Diff line number Diff line
@@ -49,8 +49,8 @@ if(PKG_USER-PLUMED)
    message(STATUS "PLUMED download requested - we will build our own")
    include(ExternalProject)
    ExternalProject_Add(plumed_build
      URL https://github.com/plumed/plumed2/releases/download/v2.5.2/plumed-src-2.5.2.tgz
      URL_MD5 bd2f18346c788eb54e1e52f4f6acf41a
      URL https://github.com/plumed/plumed2/releases/download/v2.5.3/plumed-src-2.5.3.tgz
      URL_MD5 de30d6e7c2dcc0973298e24a6da24286
      BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
                                               ${CONFIGURE_REQUEST_PIC}
Loading