| 1 |
|
# Top level cmake script for OpenMD. |
| 2 |
+ |
project(OpenMD CXX) |
| 3 |
+ |
cmake_minimum_required(VERSION 2.8.5) |
| 4 |
|
|
| 5 |
< |
cmake_minimum_required (VERSION 2.6) |
| 4 |
< |
project(OpenMD) |
| 5 |
> |
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") |
| 6 |
|
|
| 7 |
+ |
if (NOT CMAKE_BUILD_TYPE) |
| 8 |
+ |
set(CMAKE_BUILD_TYPE "Release") |
| 9 |
+ |
endif() |
| 10 |
|
|
| 11 |
+ |
find_package(MPI) |
| 12 |
+ |
if (NOT MPI_CXX_FOUND) |
| 13 |
+ |
message(STATUS "========== OpenMD Parallel Information ==========") |
| 14 |
+ |
message(STATUS ) |
| 15 |
+ |
message(STATUS "No MPI compiler found. Perhaps you want to set one explicitly?") |
| 16 |
+ |
message(STATUS "To override the default compiler, set the environment variable") |
| 17 |
+ |
message(STATUS " export CXX=/full/path/to/mpic++") |
| 18 |
+ |
message(STATUS "in bash or ksh or sh. In csh or tcsh, use:") |
| 19 |
+ |
message(STATUS " setenv CXX /full/path/to/mpic++") |
| 20 |
+ |
message(STATUS "before running the cmake command.") |
| 21 |
+ |
message(STATUS ) |
| 22 |
+ |
message(STATUS "=================================================") |
| 23 |
+ |
endif() |
| 24 |
+ |
IF ( MPI_CXX_FOUND ) |
| 25 |
+ |
INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH}) |
| 26 |
+ |
ENDIF() |
| 27 |
+ |
|
| 28 |
+ |
include(CheckCXXCompilerFlag) |
| 29 |
+ |
include(CheckIncludeFileCXX) |
| 30 |
+ |
include(CheckCXXSymbolExists) |
| 31 |
+ |
|
| 32 |
|
# OpenMD version number. |
| 33 |
|
set (VERSION_MAJOR "2") |
| 34 |
|
set (VERSION_MINOR "0") |
| 35 |
|
set (VERSION_TINY "0") |
| 36 |
+ |
option(SINGLE_PRECISION "Build Single precision (float) version" OFF) |
| 37 |
|
|
| 38 |
< |
# cmake modules that are needed to build oopse |
| 39 |
< |
SET(CMAKE_MODULE_PATH ${OpenMD_SOURCE_DIR}/cmake/modules) |
| 40 |
< |
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) |
| 41 |
< |
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) |
| 38 |
> |
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 39 |
> |
SET(CMAKE_INSTALL_PREFIX |
| 40 |
> |
"/usr/local/openmd" CACHE PATH "OpenMD install prefix" FORCE |
| 41 |
> |
) |
| 42 |
> |
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 43 |
|
|
| 44 |
< |
enable_language(CXX C) |
| 44 |
> |
# ---------- Setup output Directories ------------------------- |
| 45 |
> |
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY |
| 46 |
> |
${PROJECT_BINARY_DIR}/lib |
| 47 |
> |
CACHE PATH |
| 48 |
> |
"Single directory for all shared libraries" |
| 49 |
> |
) |
| 50 |
> |
# --------- Setup the Executable output Directory ------------- |
| 51 |
> |
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY |
| 52 |
> |
${PROJECT_BINARY_DIR}/bin |
| 53 |
> |
CACHE PATH |
| 54 |
> |
"Single directory for all Executables." |
| 55 |
> |
) |
| 56 |
> |
# --------- Setup the static library directory ------------- |
| 57 |
> |
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY |
| 58 |
> |
${PROJECT_BINARY_DIR}/lib |
| 59 |
> |
CACHE PATH |
| 60 |
> |
"Single directory for all static libraries." |
| 61 |
> |
) |
| 62 |
|
|
| 19 |
– |
if ( APPLE ) |
| 20 |
– |
set(MPI_COMPILER /opt/local/lib/openmpi/bin/mpic++) |
| 21 |
– |
set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" ) |
| 22 |
– |
endif( APPLE ) |
| 23 |
– |
FIND_PACKAGE(MPI) |
| 24 |
– |
IF ( MPI_FOUND ) |
| 25 |
– |
SET(CMAKE_REQUIRED_INCLUDES "${MPI_INCLUDE_PATH};${CMAKE_REQUIRED_INCLUDES}") |
| 26 |
– |
INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH}) |
| 27 |
– |
ENDIF() |
| 28 |
– |
|
| 63 |
|
FIND_PACKAGE(Subversion) |
| 64 |
|
IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn ) |
| 65 |
|
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) |
| 66 |
< |
MESSAGE("Current revision is ${Project_WC_REVISION}") |
| 66 |
> |
MESSAGE(STATUS "Current revision is ${Project_WC_REVISION}") |
| 67 |
|
Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) |
| 68 |
|
SET(SVN_REV ${Project_WC_REVISION}) |
| 69 |
|
ADD_DEFINITIONS( -DSVN_REV=${Project_WC_REVISION} ) |
| 70 |
+ |
SET(GENERATELOGS "${PROJECT_SOURCE_DIR}/doc/svn2cl") |
| 71 |
+ |
ADD_CUSTOM_TARGET(ChangeLog |
| 72 |
+ |
COMMAND ${GENERATELOGS} "--group-by-day" "--include-rev" |
| 73 |
+ |
"--linelen=78" "--output=${PROJECT_BINARY_DIR}/ChangeLog" "${PROJECT_SOURCE_DIR}" |
| 74 |
+ |
) |
| 75 |
|
ENDIF() |
| 76 |
|
|
| 77 |
+ |
check_include_file_cxx(conio.h HAVE_CONIO_H) |
| 78 |
+ |
check_cxx_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP) |
| 79 |
+ |
|
| 80 |
|
# Optional libraries: If we can find these, we will build with them |
| 81 |
|
# Look for OpenBabel libraries |
| 82 |
|
find_package(OpenBabel2) |
| 83 |
|
IF(OPENBABEL2_FOUND) |
| 84 |
|
SET(USE_OPENBABEL) |
| 85 |
|
include_directories(${OPENBABEL2_INCLUDE_DIR}) |
| 86 |
< |
message(STATUS "Openbabel libs: " ${OPENBABEL2_LIBRARIES}) |
| 87 |
< |
# TARGET_LINK_LIBRARIES(${OPENBABEL2_LIBRARIES}) |
| 86 |
> |
# link libraries are added only for targets that need them. |
| 87 |
> |
ELSE(OPENBABEL2_FOUND) |
| 88 |
> |
MESSAGE(STATUS "No OpenBabel found - will not build atom2md") |
| 89 |
|
ENDIF(OPENBABEL2_FOUND) |
| 90 |
|
|
| 91 |
|
#Look for QHULL Libraries |
| 92 |
< |
find_package(QHULL) |
| 92 |
> |
set(QHULL_USE_STATIC 1) |
| 93 |
> |
find_package(Qhull) |
| 94 |
|
IF(QHULL_FOUND) |
| 95 |
|
SET(HAVE_QHULL 1) |
| 96 |
|
include_directories(${QHULL_INCLUDE_DIR}) |
| 97 |
|
LINK_LIBRARIES(${QHULL_LIBRARIES}) |
| 98 |
+ |
ELSE(QHULL_FOUND) |
| 99 |
+ |
MESSAGE(STATUS "No Qhull found - will be missing some features") |
| 100 |
|
ENDIF(QHULL_FOUND) |
| 101 |
|
|
| 56 |
– |
|
| 102 |
|
# zlib stuff |
| 103 |
|
find_package(ZLIB) |
| 104 |
|
if(ZLIB_FOUND) |
| 106 |
|
add_definitions(-DHAVE_LIBZ) |
| 107 |
|
include_directories(${ZLIB_INCLUDE_DIR}) |
| 108 |
|
LINK_LIBRARIES(${ZLIB_LIBRARIES}) |
| 109 |
+ |
ELSE(ZLIB_FOUND) |
| 110 |
+ |
MESSAGE(STATUS "No zlib found - will be missing compressed dump files") |
| 111 |
|
endif(ZLIB_FOUND) |
| 112 |
|
|
| 113 |
< |
#FFTW |
| 114 |
< |
INCLUDE(${CMAKE_MODULE_PATH}/FindFFTW.cmake) |
| 115 |
< |
IF(FFTW_FOUND) |
| 113 |
> |
#FFTW3 |
| 114 |
> |
IF(SINGLE_PRECISION) |
| 115 |
> |
find_package(FFTW3 COMPONENTS single) |
| 116 |
> |
else() |
| 117 |
> |
find_package(FFTW3 COMPONENTS double) |
| 118 |
> |
endif(SINGLE_PRECISION) |
| 119 |
> |
if (FFTW3_FOUND) |
| 120 |
> |
include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FFTW3_INCLUDE_DIR}) |
| 121 |
|
SET(HAVE_LIBFFTW 1) |
| 122 |
< |
SET(HAVE_FFTW3_H) |
| 123 |
< |
INCLUDE_DIRECTORIES(${FFTW_INCLUDE_DIR}) |
| 124 |
< |
LINK_LIBRARIES(${FFTW_LIBRARIES}) |
| 125 |
< |
ENDIF(FFTW_FOUND) |
| 122 |
> |
SET(HAVE_FFTW3_H 1) |
| 123 |
> |
INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR}) |
| 124 |
> |
LINK_LIBRARIES(${FFTW3_LIBRARIES}) |
| 125 |
> |
ELSE(FFTW3_FOUND) |
| 126 |
> |
MESSAGE(STATUS "No fftw3 found - will be missing some analysis modules") |
| 127 |
> |
endif (FFTW3_FOUND) |
| 128 |
|
|
| 129 |
|
|
| 130 |
< |
#include checks |
| 131 |
< |
include(CheckIncludeFile) |
| 132 |
< |
CHECK_INCLUDE_FILE(fftw3.h HAVE_FFTW3_H) |
| 133 |
< |
CHECK_INCLUDE_FILE(fftw.h HAVE_FFWT_H) |
| 134 |
< |
CHECK_INCLUDE_FILE(dfftw.h HAVE_DFFTW_H) |
| 135 |
< |
CHECK_INCLUDE_FILE(cmath.h HAVE_CMATH_H) |
| 136 |
< |
check_include_file(limits.h HAVE_LIMITS_H) |
| 137 |
< |
check_include_file(stdlib.h HAVE_STDLIB_H) |
| 138 |
< |
check_include_file(string.h HAVE_STRING_H) |
| 139 |
< |
check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H) |
| 86 |
< |
check_include_file(unistd.h HAVE_UNISTD_H) |
| 130 |
> |
# add a target to generate API documentation with Doxygen |
| 131 |
> |
find_package(Doxygen) |
| 132 |
> |
if(DOXYGEN_FOUND) |
| 133 |
> |
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" @ONLY) |
| 134 |
> |
add_custom_target(doc |
| 135 |
> |
${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" |
| 136 |
> |
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc" |
| 137 |
> |
COMMENT "Generating API documentation with Doxygen" VERBATIM |
| 138 |
> |
) |
| 139 |
> |
endif(DOXYGEN_FOUND) |
| 140 |
|
|
| 88 |
– |
#symbol checks |
| 89 |
– |
include(CheckSymbolExists) |
| 90 |
– |
|
| 91 |
– |
#function checks |
| 92 |
– |
include(CheckFunctionExists) |
| 93 |
– |
check_function_exists(atexit HAVE_ATEXIT) |
| 94 |
– |
check_function_exists(floor HAVE_FLOOR) |
| 95 |
– |
check_function_exists(pow HAVE_POW) |
| 96 |
– |
check_function_exists(select HAVE_SELECT) |
| 97 |
– |
check_function_exists(sqrt HAVE_SQRT) |
| 98 |
– |
check_function_exists(strcasecmp HAVE_STRCASECMP) |
| 99 |
– |
check_function_exists(strchr HAVE_STRCHR) |
| 100 |
– |
check_function_exists(strdup HAVE_STRDUP) |
| 101 |
– |
check_function_exists(strncasecmp HAVE_STRNCASECMP) |
| 102 |
– |
check_function_exists(strstr HAVE_STRSTR) |
| 103 |
– |
check_function_exists(strtol HAVE_STRTOL) |
| 104 |
– |
check_function_exists(strtoull HAVE_STRTOULL) |
| 105 |
– |
check_function_exists(sysmp HAVE_SYSMP) |
| 106 |
– |
check_function_exists(table HAVE_TABLE) |
| 107 |
– |
|
| 108 |
– |
|
| 141 |
|
FIND_PACKAGE(Perl) |
| 142 |
|
IF(PERL_FOUND) |
| 143 |
|
SET(PERL ${PERL_EXECUTABLE}) |
| 144 |
|
ELSE(PERL_FOUND) |
| 145 |
< |
MESSAGE(STATUS "Failed to find perl") |
| 145 |
> |
MESSAGE(STATUS "Failed to find perl - some scripts will not be made") |
| 146 |
|
ENDIF(PERL_FOUND) |
| 147 |
|
|
| 148 |
+ |
SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation |
| 149 |
+ |
locations") |
| 150 |
+ |
|
| 151 |
|
FIND_PACKAGE(PythonInterp) |
| 152 |
|
IF(PYTHON_EXECUTABLE) |
| 153 |
|
SET(PYTHON ${PYTHON_EXECUTABLE}) |
| 154 |
|
ELSE(PYTHON_EXECUTABLE) |
| 155 |
< |
MESSAGE(STATUS "Failed to find python") |
| 155 |
> |
MESSAGE(STATUS "Failed to find python - some scripts will not be made") |
| 156 |
|
ENDIF(PYTHON_EXECUTABLE) |
| 157 |
|
|
| 123 |
– |
SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation locations") |
| 124 |
– |
|
| 125 |
– |
|
| 126 |
– |
include(CMakePrintSystemInformation) |
| 127 |
– |
|
| 158 |
|
configure_file ( |
| 159 |
|
"${PROJECT_SOURCE_DIR}/src/config.h.cmake" |
| 160 |
< |
"${PROJECT_SOURCE_DIR}/src/config.h" |
| 161 |
< |
) |
| 162 |
< |
include_directories (${PROJECT_SOURCE_DIR}/src) |
| 160 |
> |
"${PROJECT_BINARY_DIR}/config.h" |
| 161 |
> |
) |
| 162 |
> |
include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src") |
| 163 |
|
|
| 134 |
– |
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) |
| 135 |
– |
|
| 136 |
– |
|
| 164 |
|
#Add executables for build |
| 165 |
|
set (PROGRAMS |
| 166 |
|
openmd |
| 240 |
|
src/io/ChargeAtomTypesSectionParser.cpp |
| 241 |
|
src/io/DirectionalAtomTypesSectionParser.cpp |
| 242 |
|
src/io/EAMAtomTypesSectionParser.cpp |
| 243 |
+ |
src/io/FluctuatingChargeAtomTypesSectionParser.cpp |
| 244 |
|
src/io/ForceFieldOptions.cpp |
| 245 |
|
src/io/GayBerneAtomTypesSectionParser.cpp |
| 246 |
|
src/io/Globals.cpp |
| 251 |
|
src/io/NonBondedInteractionsSectionParser.cpp |
| 252 |
|
src/io/OptionSectionParser.cpp |
| 253 |
|
src/io/ParamConstraint.cpp |
| 254 |
+ |
src/io/PolarizableAtomTypesSectionParser.cpp |
| 255 |
|
src/io/SCAtomTypesSectionParser.cpp |
| 256 |
|
src/io/SectionParser.cpp |
| 257 |
|
src/io/SectionParserManager.cpp |
| 320 |
|
src/types/CharmmTorsionType.cpp |
| 321 |
|
src/types/Component.cpp |
| 322 |
|
src/types/CutoffGroupStamp.cpp |
| 323 |
< |
src/types/DirectionalAtomType.cpp |
| 323 |
> |
src/types/DirectionalAdapter.cpp |
| 324 |
> |
src/types/EAMAdapter.cpp |
| 325 |
> |
src/types/FixedChargeAdapter.cpp |
| 326 |
> |
src/types/FluctuatingChargeAdapter.cpp |
| 327 |
|
src/types/FragmentStamp.cpp |
| 328 |
+ |
src/types/GayBerneAdapter.cpp |
| 329 |
|
src/types/ImproperCosineInversionType.cpp |
| 330 |
|
src/types/InversionStamp.cpp |
| 331 |
+ |
src/types/LennardJonesAdapter.cpp |
| 332 |
|
src/types/MoleculeStamp.cpp |
| 333 |
+ |
src/types/MultipoleAdapter.cpp |
| 334 |
|
src/types/NonBondedInteractionType.cpp |
| 335 |
+ |
src/types/PolarizableAdapter.cpp |
| 336 |
|
src/types/RestraintStamp.cpp |
| 337 |
|
src/types/RigidBodyStamp.cpp |
| 338 |
|
src/types/ShapeAtomType.cpp |
| 339 |
+ |
src/types/StickyAdapter.cpp |
| 340 |
+ |
src/types/SuttonChenAdapter.cpp |
| 341 |
|
src/types/TorsionStamp.cpp |
| 342 |
|
src/types/ZconsStamp.cpp |
| 343 |
|
src/UseTheForce/Amber_FF.cpp |
| 394 |
|
src/restraints/RestraintForceManager.cpp |
| 395 |
|
src/restraints/ThermoIntegrationForceManager.cpp |
| 396 |
|
src/utils/ProgressBar.cpp |
| 397 |
< |
src/utils/simError.c |
| 397 |
> |
src/utils/simError.cpp |
| 398 |
|
) |
| 399 |
|
|
| 400 |
|
IF(QHULL_FOUND) |
| 428 |
|
COMPILE_DEFINITIONS IS_MPI |
| 429 |
|
) |
| 430 |
|
target_link_libraries(openmd_MPI openmd_parallel openmd_core openmd_parallel openmd_core) |
| 431 |
+ |
INSTALL(TARGETS |
| 432 |
+ |
openmd_parallel openmd_MPI |
| 433 |
+ |
RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
| 434 |
+ |
LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
| 435 |
+ |
ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
| 436 |
+ |
) |
| 437 |
|
ENDIF (MPI_FOUND) |
| 438 |
|
|
| 439 |
|
set (DUMP2XYZSOURCE |
| 440 |
|
src/applications/dump2Xyz/Dump2XYZ.cpp |
| 441 |
< |
src/applications/dump2Xyz/Dump2XYZCmd.c |
| 441 |
> |
src/applications/dump2Xyz/Dump2XYZCmd.cpp |
| 442 |
|
) |
| 443 |
|
|
| 444 |
|
set (DYNAMICPROPSSOURCE |
| 459 |
|
src/applications/dynamicProps/ThetaCorrFunc.cpp |
| 460 |
|
src/applications/dynamicProps/TimeCorrFunc.cpp |
| 461 |
|
src/applications/dynamicProps/VCorrFunc.cpp |
| 462 |
< |
src/applications/dynamicProps/DynamicPropsCmd.c |
| 462 |
> |
src/applications/dynamicProps/DynamicPropsCmd.cpp |
| 463 |
|
) |
| 464 |
|
|
| 465 |
|
set (HYDROSOURCE |
| 472 |
|
src/applications/hydrodynamics/HydrodynamicsModelFactory.cpp |
| 473 |
|
src/applications/hydrodynamics/RoughShell.cpp |
| 474 |
|
src/applications/hydrodynamics/ShapeBuilder.cpp |
| 475 |
< |
src/applications/hydrodynamics/HydroCmd.c |
| 475 |
> |
src/applications/hydrodynamics/HydroCmd.cpp |
| 476 |
|
) |
| 477 |
|
|
| 478 |
|
set (STATICPROPSSOURCE |
| 501 |
|
src/applications/staticProps/StaticProps.cpp |
| 502 |
|
src/applications/staticProps/TetrahedralityParam.cpp |
| 503 |
|
src/applications/staticProps/TwoDGofR.cpp |
| 504 |
< |
src/applications/staticProps/StaticPropsCmd.c |
| 504 |
> |
src/applications/staticProps/StaticPropsCmd.cpp |
| 505 |
|
) |
| 506 |
|
|
| 507 |
|
set (NANOPARTICLEBUILDERSOURCE |
| 508 |
|
src/applications/nanoparticleBuilder/nanoparticleBuilder.cpp |
| 509 |
|
src/applications/nanoparticleBuilder/shapedLatticeSpherical.cpp |
| 510 |
< |
src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.c |
| 510 |
> |
src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.cpp |
| 511 |
|
) |
| 512 |
|
|
| 513 |
+ |
set (NANORODBUILDERSOURCE |
| 514 |
+ |
src/applications/nanoparticleBuilder/nanorodBuilder.cpp |
| 515 |
+ |
src/applications/nanoparticleBuilder/shapedLatticeRod.cpp |
| 516 |
+ |
src/applications/nanoparticleBuilder/nanorodBuilderCmd.cpp |
| 517 |
+ |
) |
| 518 |
+ |
|
| 519 |
+ |
set (NANOROD_PENTBUILDERSOURCE |
| 520 |
+ |
src/applications/nanoparticleBuilder/nanorod_pentBuilder.cpp |
| 521 |
+ |
src/applications/nanoparticleBuilder/nanorod_pentBuilderCmd.cpp |
| 522 |
+ |
src/applications/nanoparticleBuilder/shapedLatticePentRod.cpp |
| 523 |
+ |
) |
| 524 |
+ |
|
| 525 |
|
set (RANDOMBUILDERSOURCE |
| 526 |
|
src/applications/randomBuilder/randomBuilder.cpp |
| 527 |
< |
src/applications/randomBuilder/randomBuilderCmd.c |
| 527 |
> |
src/applications/randomBuilder/randomBuilderCmd.cpp |
| 528 |
|
) |
| 529 |
|
|
| 530 |
|
set(SIMPLEBUILDERSOURCE |
| 531 |
|
src/applications/simpleBuilder/simpleBuilder.cpp |
| 532 |
< |
src/applications/simpleBuilder/simpleBuilderCmd.c |
| 532 |
> |
src/applications/simpleBuilder/simpleBuilderCmd.cpp |
| 533 |
|
) |
| 534 |
|
|
| 535 |
|
set(THERMALIZERSOURCE |
| 536 |
|
src/applications/thermalizer/thermalizer.cpp |
| 537 |
< |
src/applications/thermalizer/thermalizerCmd.c |
| 537 |
> |
src/applications/thermalizer/thermalizerCmd.cpp |
| 538 |
|
) |
| 539 |
|
|
| 540 |
|
add_executable(Dump2XYZ ${DUMP2XYZSOURCE}) |
| 547 |
|
target_link_libraries(StaticProps openmd_single openmd_core openmd_single openmd_core) |
| 548 |
|
add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE}) |
| 549 |
|
target_link_libraries(nanoparticleBuilder openmd_single openmd_core openmd_single openmd_core) |
| 550 |
+ |
add_executable(nanorodBuilder ${NANORODBUILDERSOURCE}) |
| 551 |
+ |
target_link_libraries(nanorodBuilder openmd_single openmd_core openmd_single openmd_core) |
| 552 |
+ |
add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE}) |
| 553 |
+ |
target_link_libraries(nanorod_pentBuilder openmd_single openmd_core openmd_single openmd_core) |
| 554 |
|
add_executable(randomBuilder ${RANDOMBUILDERSOURCE}) |
| 555 |
|
target_link_libraries(randomBuilder openmd_single openmd_core openmd_single openmd_core) |
| 556 |
|
add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE}) |
| 565 |
|
) |
| 566 |
|
add_executable(atom2md ${ATOM2MDSOURCE}) |
| 567 |
|
target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES}) |
| 568 |
+ |
INSTALL(TARGETS atom2md RUNTIME DESTINATION bin |
| 569 |
+ |
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 570 |
|
ENDIF (OPENBABEL2_FOUND) |
| 571 |
|
|
| 572 |
|
|
| 580 |
|
src/applications/utilities/principalAxisCalculator |
| 581 |
|
src/applications/utilities/stat2visco |
| 582 |
|
src/applications/utilities/waterRotator |
| 583 |
+ |
src/applications/utilities/waterReplacer |
| 584 |
|
) |
| 585 |
|
|
| 586 |
|
IF(PYTHON_EXECUTABLE) |
| 587 |
|
foreach(PY_FILE ${PY_FILES}) |
| 588 |
< |
configure_file(${PY_FILE} "${EXECUTABLE_OUTPUT_PATH}"/${PY_FILE} @ONLY) |
| 588 |
> |
GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME) |
| 589 |
> |
CONFIGURE_FILE(${PY_FILE} |
| 590 |
> |
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY) |
| 591 |
> |
INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" |
| 592 |
> |
DESTINATION bin |
| 593 |
> |
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 594 |
|
endforeach(PY_FILE) |
| 527 |
– |
#INSTALL(FILES ${PY_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) |
| 595 |
|
ENDIF(PYTHON_EXECUTABLE) |
| 596 |
|
|
| 597 |
|
set(PERL_FILES |
| 601 |
|
|
| 602 |
|
IF(PERL_FOUND) |
| 603 |
|
foreach(PERL_FILE ${PERL_FILES}) |
| 604 |
< |
configure_file(${PERL_FILE} "${EXECUTABLE_OUTPUT_PATH}"/${PERL_FILE} @ONLY) |
| 605 |
< |
endforeach(PERL_FILE) |
| 606 |
< |
#INSTALL(FILES ${PERL_FILES} DESTINATION ${EXECUTABLE_OUTPUT_PATH}) |
| 604 |
> |
GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME) |
| 605 |
> |
configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY) |
| 606 |
> |
INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" |
| 607 |
> |
DESTINATION bin |
| 608 |
> |
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
| 609 |
> |
|
| 610 |
> |
endforeach(PERL_FILE) |
| 611 |
|
ENDIF(PERL_FOUND) |
| 612 |
+ |
|
| 613 |
+ |
INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION . |
| 614 |
+ |
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) |
| 615 |
+ |
INSTALL(TARGETS |
| 616 |
+ |
openmd_core |
| 617 |
+ |
openmd_single |
| 618 |
+ |
openmd |
| 619 |
+ |
Dump2XYZ |
| 620 |
+ |
simpleBuilder |
| 621 |
+ |
StaticProps |
| 622 |
+ |
DynamicProps |
| 623 |
+ |
randomBuilder |
| 624 |
+ |
nanoparticleBuilder |
| 625 |
+ |
thermalizer |
| 626 |
+ |
Hydro |
| 627 |
+ |
RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
| 628 |
+ |
LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
| 629 |
+ |
ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ |
| 630 |
+ |
) |
| 631 |
+ |
|
| 632 |
+ |
install(DIRECTORY forceFields/ |
| 633 |
+ |
DESTINATION forceFields |
| 634 |
+ |
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
| 635 |
+ |
PATTERN ".svn" EXCLUDE |
| 636 |
+ |
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) |
| 637 |
+ |
install(DIRECTORY samples/ |
| 638 |
+ |
DESTINATION samples |
| 639 |
+ |
DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE |
| 640 |
+ |
PATTERN ".svn" EXCLUDE |
| 641 |
+ |
PATTERN "*.dump" EXCLUDE |
| 642 |
+ |
PATTERN "*.stat" EXCLUDE |
| 643 |
+ |
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) |
| 644 |
+ |
INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf" |
| 645 |
+ |
DESTINATION doc |
| 646 |
+ |
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) |
| 647 |
+ |
|
| 648 |
+ |
message( STATUS) |
| 649 |
+ |
message( STATUS "========== OpenMD Build Information ==========") |
| 650 |
+ |
message( STATUS "Current revision ........... = ${SVN_REV}") |
| 651 |
+ |
message( STATUS "CMAKE_SYSTEM ............... = ${CMAKE_SYSTEM}") |
| 652 |
+ |
message( STATUS "==============================================") |
| 653 |
+ |
message( STATUS "CMAKE_BUILD_TYPE ........... = ${CMAKE_BUILD_TYPE}") |
| 654 |
+ |
message( STATUS "CMAKE_INSTALL_PREFIX ....... = ${CMAKE_INSTALL_PREFIX}") |
| 655 |
+ |
message( STATUS "Build as SINGLE_PRECISION .. = ${SINGLE_PRECISION}") |
| 656 |
+ |
message( STATUS "CMAKE_CXX_COMPILER ......... = ${CMAKE_CXX_COMPILER}") |
| 657 |
+ |
message( STATUS "MPI_CXX_COMPILER ........... = ${MPI_CXX_COMPILER}") |
| 658 |
+ |
message( STATUS "MPI_CXX_INCLUDE_PATH ....... = ${MPI_CXX_INCLUDE_PATH}") |
| 659 |
+ |
message( STATUS "MPI_CXX_LIBRARIES .......... = ${MPI_CXX_LIBRARIES}") |
| 660 |
+ |
message( STATUS "OPENBABEL2_ROOT ............ = ${OPENBABEL2_ROOT}") |
| 661 |
+ |
message( STATUS "OPENBABEL2_INCLUDE_DIR ..... = ${OPENBABEL2_INCLUDE_DIR}") |
| 662 |
+ |
message( STATUS "OPENBABEL2_LIBRARIES ....... = ${OPENBABEL2_LIBRARIES}") |
| 663 |
+ |
message( STATUS "QHULL_ROOT ................. = ${QHULL_ROOT}") |
| 664 |
+ |
message( STATUS "QHULL_INCLUDE_DIR .......... = ${QHULL_INCLUDE_DIR}") |
| 665 |
+ |
message( STATUS "QHULL_LIBRARIES ............ = ${QHULL_LIBRARIES}") |
| 666 |
+ |
message( STATUS "ZLIB_ROOT .................. = ${ZLIB_ROOT}") |
| 667 |
+ |
message( STATUS "ZLIB_INCLUDE_DIR ........... = ${ZLIB_INCLUDE_DIR}") |
| 668 |
+ |
message( STATUS "ZLIB_LIBRARIES ............. = ${ZLIB_LIBRARIES}") |
| 669 |
+ |
message( STATUS "FFTW3_ROOT ................. = ${FFTW3_ROOT}") |
| 670 |
+ |
message( STATUS "FFTW3_INCLUDE_DIR .......... = ${FFTW3_INCLUDE_DIR}") |
| 671 |
+ |
message( STATUS "FFTW3_LIBRARIES ............ = ${FFTW3_LIBRARIES}") |
| 672 |
+ |
message( STATUS "PERL_EXECUTABLE ............ = ${PERL_EXECUTABLE}") |
| 673 |
+ |
message( STATUS "PYTHON_EXECUTABLE .......... = ${PYTHON_EXECUTABLE}") |
| 674 |
+ |
message( STATUS "DOXYGEN_EXECUTABLE ......... = ${DOXYGEN_EXECUTABLE}") |
| 675 |
+ |
message( STATUS ) |
| 676 |
+ |
message( STATUS "To override these options, add -D{OPTION_NAME}=... to the cmake command" ) |
| 677 |
+ |
message( STATUS "Particularly useful defines are for:") |
| 678 |
+ |
message( STATUS ) |
| 679 |
+ |
message( STATUS " -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} (where OpenMD will be installed)") |
| 680 |
+ |
message( STATUS " -DOPENBABEL2_ROOT=/path/to/openbabel") |
| 681 |
+ |
message( STATUS " -DQHULL_ROOT=/path/to/qhull") |
| 682 |
+ |
message( STATUS " -DFFTW3_ROOT=/path/to/fftw3") |
| 683 |
+ |
message( STATUS ) |
| 684 |
+ |
message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"") |
| 685 |
+ |
message( STATUS ) |