forked from lijiext/lammps
cmake: remove LAMMPS_DEPS
This commit is contained in:
parent
5828815b3e
commit
0e3f4f3de2
|
@ -126,7 +126,6 @@ endif()
|
|||
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(LAMMPS_DEPS)
|
||||
set(LAMMPS_API_DEFINES)
|
||||
|
||||
set(DEFAULT_PACKAGES ASPHERE BODY CLASS2 COLLOID COMPRESS CORESHELL DIPOLE
|
||||
|
@ -526,7 +525,7 @@ add_custom_target(gitversion COMMAND ${CMAKE_COMMAND}
|
|||
-DLAMMPS_STYLE_HEADERS_DIR="${LAMMPS_STYLE_HEADERS_DIR}"
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/Modules/generate_lmpgitversion.cmake)
|
||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${LAMMPS_STYLE_HEADERS_DIR}/gitversion.h)
|
||||
list(APPEND LAMMPS_DEPS gitversion)
|
||||
add_dependencies(lammps gitversion)
|
||||
|
||||
###########################################
|
||||
# Actually add executable and lib to build
|
||||
|
@ -537,9 +536,6 @@ if (${_index} GREATER -1)
|
|||
target_link_libraries(lammps PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||
endif()
|
||||
if(BUILD_LIB)
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(lammps ${LAMMPS_DEPS})
|
||||
endif()
|
||||
set(LAMMPS_CXX_HEADERS
|
||||
${LAMMPS_SOURCE_DIR}/angle.h
|
||||
${LAMMPS_SOURCE_DIR}/atom.h
|
||||
|
@ -584,12 +580,6 @@ if(BUILD_LIB)
|
|||
endif()
|
||||
|
||||
if(BUILD_EXE)
|
||||
if(NOT BUILD_LIB)
|
||||
if(LAMMPS_DEPS)
|
||||
add_dependencies(${LAMMPS_EXE} ${LAMMPS_DEPS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(${LAMMPS_EXE} PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
|
||||
install(TARGETS ${LAMMPS_EXE} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME ${LAMMPS_BINARY}.1)
|
||||
|
|
|
@ -19,5 +19,5 @@ ExternalProject_get_property(mpi4win_build SOURCE_DIR)
|
|||
add_definitions(-DMPICH_SKIP_MPICXX)
|
||||
include_directories("${SOURCE_DIR}/include")
|
||||
set(MPI4WIN_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")
|
||||
list(APPEND LAMMPS_DEPS mpi4win_build)
|
||||
add_dependencies(lammps mpi4win_build)
|
||||
set(LAMMPS_USE_MPI4WIN ON)
|
||||
|
|
|
@ -57,7 +57,7 @@ if(PKG_KIM)
|
|||
ExternalProject_get_property(kim_build INSTALL_DIR)
|
||||
set(KIM-API_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api)
|
||||
set(KIM-API_LDFLAGS ${INSTALL_DIR}/${_KIM_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
list(APPEND LAMMPS_DEPS kim_build)
|
||||
add_dependencies(lammps kim_build)
|
||||
else()
|
||||
find_package(KIM-API ${KIM-API_MIN_VERSION} REQUIRED)
|
||||
endif()
|
||||
|
|
|
@ -24,7 +24,7 @@ if(PKG_LATTE)
|
|||
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
BUILD_BYPRODUCTS <INSTALL_DIR>/${_LATTE_LIBDIR}/liblatte.a
|
||||
)
|
||||
list(APPEND LAMMPS_DEPS latte_build)
|
||||
add_dependencies(lammps latte_build)
|
||||
ExternalProject_get_property(latte_build INSTALL_DIR)
|
||||
set(LATTE_LIBRARIES ${INSTALL_DIR}/${_LATTE_LIBDIR}/liblatte.a)
|
||||
else()
|
||||
|
|
|
@ -32,7 +32,7 @@ if(PKG_MSCG)
|
|||
set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a)
|
||||
ExternalProject_get_property(mscg_build SOURCE_DIR)
|
||||
set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS mscg_build)
|
||||
add_dependencies(lammps mscg_build)
|
||||
if(NOT LAPACK_FOUND)
|
||||
file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS})
|
||||
add_dependencies(mscg_build linalg)
|
||||
|
|
|
@ -67,7 +67,7 @@ if(PKG_USER-PLUMED)
|
|||
)
|
||||
ExternalProject_get_property(plumed_build INSTALL_DIR)
|
||||
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})
|
||||
list(APPEND LAMMPS_DEPS plumed_build)
|
||||
add_dependencies(lammps plumed_build)
|
||||
if(PLUMED_MODE STREQUAL "STATIC")
|
||||
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
|
||||
target_link_libraries(lammps ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS})
|
||||
|
|
|
@ -47,7 +47,7 @@ if(PKG_USER-SCAFACOS)
|
|||
ExternalProject_get_property(scafacos_build INSTALL_DIR)
|
||||
set(SCAFACOS_BUILD_DIR ${INSTALL_DIR})
|
||||
set(SCAFACOS_INCLUDE_DIRS ${SCAFACOS_BUILD_DIR}/include)
|
||||
list(APPEND LAMMPS_DEPS scafacos_build)
|
||||
add_dependencies(lammps scafacos_build)
|
||||
# list and order from pkg_config file of ScaFaCoS build
|
||||
target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs.a)
|
||||
target_link_libraries(lammps PRIVATE ${SCAFACOS_BUILD_DIR}/lib/libfcs_direct.a)
|
||||
|
|
|
@ -16,7 +16,7 @@ if(PKG_USER-SMD)
|
|||
)
|
||||
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
|
||||
set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR})
|
||||
list(APPEND LAMMPS_DEPS Eigen3_build)
|
||||
add_dependencies(lammps Eigen3_build)
|
||||
else()
|
||||
find_package(Eigen3 NO_MODULE)
|
||||
mark_as_advanced(Eigen3_DIR)
|
||||
|
|
|
@ -31,7 +31,7 @@ if(PKG_VORONOI)
|
|||
ExternalProject_get_property(voro_build SOURCE_DIR)
|
||||
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
|
||||
set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src)
|
||||
list(APPEND LAMMPS_DEPS voro_build)
|
||||
add_dependencies(lammps voro_build)
|
||||
else()
|
||||
find_package(VORO)
|
||||
if(NOT VORO_FOUND)
|
||||
|
|
Loading…
Reference in New Issue