cmake: add support for REAX and hence Fortran

This commit is contained in:
Christoph Junghans
2017-07-13 23:27:55 -06:00
parent bfb449cec9
commit 7f1789a0c4
5 changed files with 16 additions and 2 deletions

View File

@ -38,7 +38,7 @@ find_package(UnixCommands)
option(CMAKE_VERBOSE_MAKEFILE "Verbose makefile" OFF)
set(PACKAGES ASPHERE)
set(PACKAGES ASPHERE REAX)
foreach(PKG ${PACKAGES})
option(ENABLE_${PKG} "Build ${PKG} Package" OFF)
endforeach()
@ -90,6 +90,13 @@ foreach(PKG ${PACKAGES})
include_directories(${CMAKE_SOURCE_DIR}/../src/${PKG})
endif()
endforeach()
if(ENABLE_REAX)
enable_language(Fortran)
file(GLOB REAX_SOURCES ${CMAKE_SOURCE_DIR}/../lib/reax/*.F)
list(APPEND LIB_SOURCES ${REAX_SOURCES})
include_directories(${CMAKE_SOURCE_DIR}/../lib/reax)
endif()
include_directories(${CMAKE_SOURCE_DIR}/../src)
include_directories(${CMAKE_SOURCE_DIR}/Headers)
configure_file(${CMAKE_SOURCE_DIR}/Headers/package.h.cmakein ${CMAKE_BINARY_DIR}/cmake/package.h)

View File

@ -1 +1,2 @@
#cmakedefine ENABLE_ASPHERE
#cmakedefine ENABLE_REAX

View File

@ -1,3 +1,4 @@
#include "package.h"
#include "balance.h"
#include "change_box.h"
#include "create_atoms.h"
@ -19,5 +20,4 @@
#include "write_coeff.h"
#include "write_data.h"
#include "write_dump.h"
#include "package.h"
#include "write_restart.h"

View File

@ -62,6 +62,9 @@
#include "fix_print.h"
#include "fix_property_atom.h"
#include "fix_read_restart.h"
#ifdef ENABLE_REAX
#include "fix_reax_bonds.h"
#endif
#include "fix_recenter.h"
#include "fix_respa.h"
#include "fix_restrain.h"

View File

@ -34,6 +34,9 @@
#include "pair_lj_smooth_linear.h"
#include "pair_mie_cut.h"
#include "pair_morse.h"
#ifdef ENABLE_REAX
#include "pair_reax.h"
#endif
#ifdef ENABLE_ASPHERE
#include "pair_resquared.h"
#endif