ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
Revision: 1748
Committed: Wed Jun 6 19:54:09 2012 UTC (13 years ago) by gezelter
Content type: text/plain
File size: 24666 byte(s)
Log Message:
fixing some bugs, adding Shake

File Contents

# Content
1 # Top level cmake script for OpenMD.
2 project(OpenMD CXX)
3 cmake_minimum_required(VERSION 2.8.5)
4
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 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 # ---------- 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
63 FIND_PACKAGE(Subversion)
64 IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn )
65 Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
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 # 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 find_package(Eigen3)
92 if(EIGEN3_FOUND)
93 add_definitions(-DHAVE_EIGEN -DHAVE_EIGEN3)
94 include_directories(${EIGEN3_INCLUDE_DIR})
95 else()
96 find_package(Eigen2) # find and setup Eigen2
97 if(EIGEN2_FOUND)
98 add_definitions (-DHAVE_EIGEN)
99 include_directories(${EIGEN2_INCLUDE_DIR})
100 endif()
101 endif()
102
103 #Look for QHULL Libraries
104 set(QHULL_USE_STATIC 1)
105 find_package(Qhull)
106 IF(QHULL_FOUND)
107 SET(HAVE_QHULL 1)
108 include_directories(${QHULL_INCLUDE_DIR})
109 LINK_LIBRARIES(${QHULL_LIBRARIES})
110 ELSE(QHULL_FOUND)
111 MESSAGE(STATUS "No Qhull found - will be missing some features")
112 ENDIF(QHULL_FOUND)
113
114 # zlib stuff
115 find_package(ZLIB)
116 if(ZLIB_FOUND)
117 SET(HAVE_LIBZ 1)
118 add_definitions(-DHAVE_LIBZ)
119 include_directories(${ZLIB_INCLUDE_DIR})
120 LINK_LIBRARIES(${ZLIB_LIBRARIES})
121 ELSE(ZLIB_FOUND)
122 MESSAGE(STATUS "No zlib found - will be missing compressed dump files")
123 endif(ZLIB_FOUND)
124
125 #FFTW3
126 IF(SINGLE_PRECISION)
127 find_package(FFTW3 COMPONENTS single)
128 else()
129 find_package(FFTW3 COMPONENTS double)
130 endif(SINGLE_PRECISION)
131 if (FFTW3_FOUND)
132 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FFTW3_INCLUDE_DIR})
133 SET(HAVE_LIBFFTW 1)
134 SET(HAVE_FFTW3_H 1)
135 INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
136 LINK_LIBRARIES(${FFTW3_LIBRARIES})
137 ELSE(FFTW3_FOUND)
138 MESSAGE(STATUS "No fftw3 found - will be missing some analysis modules")
139 endif (FFTW3_FOUND)
140
141
142 # add a target to generate API documentation with Doxygen
143 find_package(Doxygen)
144 if(DOXYGEN_FOUND)
145 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" @ONLY)
146 add_custom_target(doc
147 ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile"
148 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc"
149 COMMENT "Generating API documentation with Doxygen" VERBATIM
150 )
151 endif(DOXYGEN_FOUND)
152
153 FIND_PACKAGE(Perl)
154 IF(PERL_FOUND)
155 SET(PERL ${PERL_EXECUTABLE})
156 ELSE(PERL_FOUND)
157 MESSAGE(STATUS "Failed to find perl - some scripts will not be made")
158 ENDIF(PERL_FOUND)
159
160 SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation
161 locations")
162
163 FIND_PACKAGE(PythonInterp)
164 IF(PYTHON_EXECUTABLE)
165 SET(PYTHON ${PYTHON_EXECUTABLE})
166 ELSE(PYTHON_EXECUTABLE)
167 MESSAGE(STATUS "Failed to find python - some scripts will not be made")
168 ENDIF(PYTHON_EXECUTABLE)
169
170 configure_file (
171 "${PROJECT_SOURCE_DIR}/src/config.h.cmake"
172 "${PROJECT_BINARY_DIR}/config.h"
173 )
174 include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src")
175
176 #Add executables for build
177 set (PROGRAMS
178 openmd
179 openmd_MPI
180 Dump2XYZ
181 simpleBuilder
182 StaticProps
183 DynamicProps
184 randomBuilder
185 nanoparticleBuilder
186 thermalizer
187 atom2md
188 Hydro)
189
190 set(SOURCE
191 src/antlr/ANTLRUtil.cpp
192 src/antlr/ASTFactory.cpp
193 src/antlr/ASTNULLType.cpp
194 src/antlr/ASTRefCount.cpp
195 src/antlr/BaseAST.cpp
196 src/antlr/BitSet.cpp
197 src/antlr/CharBuffer.cpp
198 src/antlr/CharScanner.cpp
199 src/antlr/CommonAST.cpp
200 src/antlr/CommonASTWithHiddenTokens.cpp
201 src/antlr/CommonHiddenStreamToken.cpp
202 src/antlr/CommonToken.cpp
203 src/antlr/InputBuffer.cpp
204 src/antlr/LLkParser.cpp
205 src/antlr/MismatchedCharException.cpp
206 src/antlr/MismatchedTokenException.cpp
207 src/antlr/NoViableAltException.cpp
208 src/antlr/NoViableAltForCharException.cpp
209 src/antlr/Parser.cpp
210 src/antlr/RecognitionException.cpp
211 src/antlr/String.cpp
212 src/antlr/Token.cpp
213 src/antlr/TokenBuffer.cpp
214 src/antlr/TokenRefCount.cpp
215 src/antlr/TokenStreamBasicFilter.cpp
216 src/antlr/TokenStreamHiddenTokenFilter.cpp
217 src/antlr/TokenStreamRewriteEngine.cpp
218 src/antlr/TokenStreamSelector.cpp
219 src/antlr/TreeParser.cpp
220 src/brains/BlockSnapshotManager.cpp
221 src/brains/DataStorage.cpp
222 src/brains/ForceField.cpp
223 src/brains/MoleculeCreator.cpp
224 src/brains/PairList.cpp
225 src/brains/Register.cpp
226 src/brains/SimSnapshotManager.cpp
227 src/brains/Snapshot.cpp
228 src/brains/Stats.cpp
229 src/constraints/Shake.cpp
230 src/constraints/Rattle.cpp
231 src/hydrodynamics/Ellipsoid.cpp
232 src/hydrodynamics/HydroProp.cpp
233 src/hydrodynamics/Sphere.cpp
234 src/integrators/DLM.cpp
235 src/flucq/FluctuatingChargeParameters.cpp
236 src/flucq/FluctuatingChargeNVT.cpp
237 src/flucq/FluctuatingChargePropagator.cpp
238 src/integrators/Integrator.cpp
239 src/integrators/IntegratorFactory.cpp
240 src/integrators/LangevinDynamics.cpp
241 src/integrators/LDForceManager.cpp
242 src/integrators/NgammaT.cpp
243 src/integrators/NPAT.cpp
244 src/integrators/NPrT.cpp
245 src/integrators/NPT.cpp
246 src/integrators/NPTf.cpp
247 src/integrators/NPTi.cpp
248 src/integrators/NPTsz.cpp
249 src/integrators/NPTxyz.cpp
250 src/integrators/NVE.cpp
251 src/integrators/NVT.cpp
252 src/integrators/VelocityVerletIntegrator.cpp
253 src/io/AtomTypesSectionParser.cpp
254 src/io/BaseAtomTypesSectionParser.cpp
255 src/io/BendTypesSectionParser.cpp
256 src/io/BondTypesSectionParser.cpp
257 src/io/ChargeAtomTypesSectionParser.cpp
258 src/io/DirectionalAtomTypesSectionParser.cpp
259 src/io/EAMAtomTypesSectionParser.cpp
260 src/io/FluctuatingChargeAtomTypesSectionParser.cpp
261 src/io/ForceFieldOptions.cpp
262 src/io/GayBerneAtomTypesSectionParser.cpp
263 src/io/Globals.cpp
264 src/io/gzstream.cpp
265 src/io/InversionTypesSectionParser.cpp
266 src/io/LennardJonesAtomTypesSectionParser.cpp
267 src/io/MultipoleAtomTypesSectionParser.cpp
268 src/io/NonBondedInteractionsSectionParser.cpp
269 src/io/OptionSectionParser.cpp
270 src/io/ParamConstraint.cpp
271 src/io/PolarizableAtomTypesSectionParser.cpp
272 src/io/SCAtomTypesSectionParser.cpp
273 src/io/SectionParser.cpp
274 src/io/SectionParserManager.cpp
275 src/io/ShapeAtomTypesSectionParser.cpp
276 src/io/StickyAtomTypesSectionParser.cpp
277 src/io/StickyPowerAtomTypesSectionParser.cpp
278 src/io/TorsionTypesSectionParser.cpp
279 src/io/ZConsReader.cpp
280 src/lattice/CubicLattice.cpp
281 src/lattice/FCCLattice.cpp
282 src/lattice/Lattice.cpp
283 src/lattice/LatticeFactory.cpp
284 src/lattice/shapedLattice.cpp
285 src/math/ChebyshevT.cpp
286 src/math/ChebyshevU.cpp
287 src/math/CubicSpline.cpp
288 src/math/LegendrePolynomial.cpp
289 src/math/RealSphericalHarmonic.cpp
290 src/math/RMSD.cpp
291 src/math/SeqRandNumGen.cpp
292 src/math/SphericalHarmonic.cpp
293 src/math/Wigner3jm.cpp
294 src/mdParser/FilenameObserver.cpp
295 src/mdParser/MDLexer.cpp
296 src/mdParser/MDParser.cpp
297 src/mdParser/MDTreeParser.cpp
298 src/optimization/OptimizationFactory.cpp
299 src/optimization/Armijo.cpp
300 src/optimization/BFGS.cpp
301 src/optimization/ConjugateGradient.cpp
302 src/optimization/Constraint.cpp
303 src/optimization/EndCriteria.cpp
304 src/optimization/LineSearch.cpp
305 src/optimization/LineSearchBasedMethod.cpp
306 src/optimization/SteepestDescent.cpp
307 src/optimization/PotentialEnergyObjectiveFunction.cpp
308 src/optimization/MinimizerParameters.cpp
309 src/nonbonded/EAM.cpp
310 src/nonbonded/Electrostatic.cpp
311 src/nonbonded/GB.cpp
312 src/nonbonded/InteractionManager.cpp
313 src/nonbonded/LJ.cpp
314 src/nonbonded/MAW.cpp
315 src/nonbonded/Morse.cpp
316 src/nonbonded/RepulsivePower.cpp
317 src/nonbonded/SC.cpp
318 src/nonbonded/Sticky.cpp
319 src/nonbonded/SwitchingFunction.cpp
320 src/primitives/Atom.cpp
321 src/primitives/Bend.cpp
322 src/primitives/DirectionalAtom.cpp
323 src/primitives/GhostBend.cpp
324 src/primitives/GhostTorsion.cpp
325 src/primitives/Inversion.cpp
326 src/primitives/Molecule.cpp
327 src/primitives/RigidBody.cpp
328 src/primitives/StuntDouble.cpp
329 src/primitives/Torsion.cpp
330 src/primitives/UreyBradleyBend.cpp
331 src/restraints/MolecularRestraint.cpp
332 src/restraints/ObjectRestraint.cpp
333 src/selection/DistanceFinder.cpp
334 src/selection/HullFinder.cpp
335 src/selection/IndexFinder.cpp
336 src/selection/NameFinder.cpp
337 src/selection/SelectionCompiler.cpp
338 src/selection/SelectionEvaluator.cpp
339 src/selection/SelectionManager.cpp
340 src/selection/SelectionToken.cpp
341 src/selection/TokenMap.cpp
342 src/types/AtomStamp.cpp
343 src/types/AtomType.cpp
344 src/types/BendStamp.cpp
345 src/types/BondStamp.cpp
346 src/types/CharmmTorsionType.cpp
347 src/types/Component.cpp
348 src/types/CutoffGroupStamp.cpp
349 src/types/DirectionalAdapter.cpp
350 src/types/EAMAdapter.cpp
351 src/types/FixedChargeAdapter.cpp
352 src/types/FluctuatingChargeAdapter.cpp
353 src/types/FragmentStamp.cpp
354 src/types/GayBerneAdapter.cpp
355 src/types/ImproperCosineInversionType.cpp
356 src/types/InversionStamp.cpp
357 src/types/LennardJonesAdapter.cpp
358 src/types/MoleculeStamp.cpp
359 src/types/MultipoleAdapter.cpp
360 src/types/NonBondedInteractionType.cpp
361 src/types/PolarizableAdapter.cpp
362 src/types/RestraintStamp.cpp
363 src/types/RigidBodyStamp.cpp
364 src/types/ShapeAtomType.cpp
365 src/types/StickyAdapter.cpp
366 src/types/SuttonChenAdapter.cpp
367 src/types/TorsionStamp.cpp
368 src/types/ZconsStamp.cpp
369 src/utils/ElementsTable.cpp
370 src/utils/MoLocator.cpp
371 src/utils/OpenMDBitSet.cpp
372 src/utils/PropertyMap.cpp
373 src/utils/StringTokenizer.cpp
374 src/utils/StringUtils.cpp
375 src/utils/Trim.cpp
376 src/utils/Utility.cpp
377 src/utils/wildcards.cpp
378 src/visitors/AtomNameVisitor.cpp
379 src/visitors/AtomVisitor.cpp
380 src/visitors/CompositeVisitor.cpp
381 src/visitors/LipidTransVisitor.cpp
382 src/visitors/OtherVisitor.cpp
383 src/visitors/ReplacementVisitor.cpp
384 src/visitors/RigidBodyVisitor.cpp
385 src/visitors/ZconsVisitor.cpp
386 src/rnemd/RNEMDParameters.cpp
387 )
388
389 set( PARALLEL_SOURCE
390 src/brains/ForceManager.cpp
391 src/brains/SimCreator.cpp
392 src/brains/SimInfo.cpp
393 src/brains/Thermo.cpp
394 src/constraints/ZconstraintForceManager.cpp
395 src/flucq/FluctuatingChargeConstraints.cpp
396 src/flucq/FluctuatingChargeObjectiveFunction.cpp
397 src/integrators/LangevinHullForceManager.cpp
398 src/rnemd/RNEMD.cpp
399 src/integrators/Velocitizer.cpp
400 src/io/DumpReader.cpp
401 src/io/DumpWriter.cpp
402 src/io/RestReader.cpp
403 src/io/RestWriter.cpp
404 src/io/StatWriter.cpp
405 src/io/ZConsWriter.cpp
406 src/io/ifstrstream.cpp
407 src/math/ParallelRandNumGen.cpp
408 src/parallel/ForceDecomposition.cpp
409 src/parallel/ForceMatrixDecomposition.cpp
410 src/restraints/RestraintForceManager.cpp
411 src/restraints/ThermoIntegrationForceManager.cpp
412 src/utils/ProgressBar.cpp
413 src/utils/simError.cpp
414 src/optimization/Problem.cpp
415 )
416
417 IF(QHULL_FOUND)
418 set(QHULL_SOURCE
419 src/integrators/LangevinHullDynamics.cpp
420 src/math/Triangle.cpp
421 )
422 set(QHULL_PARALLEL_SOURCE
423 src/integrators/LangevinHullForceManager.cpp
424 src/math/ConvexHull.cpp
425 src/math/AlphaHull.cpp
426 )
427 ENDIF(QHULL_FOUND)
428
429 add_library(openmd_core STATIC ${SOURCE} ${QHULL_SOURCE} )
430 add_library(openmd_single STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
431
432 IF(MPI_FOUND)
433 add_library(openmd_parallel STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
434 set_target_properties(openmd_parallel PROPERTIES
435 COMPILE_DEFINITIONS IS_MPI
436 )
437 ENDIF(MPI_FOUND)
438
439 add_executable(openmd src/applications/openmd/openmd.cpp)
440 target_link_libraries(openmd openmd_single openmd_core openmd_single openmd_core)
441
442 if (MPI_FOUND)
443 add_executable(openmd_MPI src/applications/openmd/openmd.cpp)
444 set_target_properties(openmd_MPI PROPERTIES
445 COMPILE_DEFINITIONS IS_MPI
446 )
447 target_link_libraries(openmd_MPI openmd_parallel openmd_core openmd_parallel openmd_core)
448 INSTALL(TARGETS
449 openmd_parallel openmd_MPI
450 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
451 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
452 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
453 )
454 ENDIF (MPI_FOUND)
455
456 set (DUMP2XYZSOURCE
457 src/applications/dump2Xyz/Dump2XYZ.cpp
458 src/applications/dump2Xyz/Dump2XYZCmd.cpp
459 )
460
461 set (DYNAMICPROPSSOURCE
462 src/applications/dynamicProps/ActionCorrFunc.cpp
463 src/applications/dynamicProps/CrossTimeCorrFunc.cpp
464 src/applications/dynamicProps/DipoleCorrFunc.cpp
465 src/applications/dynamicProps/DirectionalRCorrFunc.cpp
466 src/applications/dynamicProps/DynamicProps.cpp
467 src/applications/dynamicProps/EnergyCorrFunc.cpp
468 src/applications/dynamicProps/FrameTimeCorrFunc.cpp
469 src/applications/dynamicProps/LegendreCorrFunc.cpp
470 src/applications/dynamicProps/MomentumCorrFunc.cpp
471 src/applications/dynamicProps/ParticleTimeCorrFunc.cpp
472 src/applications/dynamicProps/RadialRCorrFunc.cpp
473 src/applications/dynamicProps/RCorrFunc.cpp
474 src/applications/dynamicProps/StressCorrFunc.cpp
475 src/applications/dynamicProps/SystemDipoleCorrFunc.cpp
476 src/applications/dynamicProps/ThetaCorrFunc.cpp
477 src/applications/dynamicProps/TimeCorrFunc.cpp
478 src/applications/dynamicProps/VCorrFunc.cpp
479 src/applications/dynamicProps/DynamicPropsCmd.cpp
480 )
481
482 set (HYDROSOURCE
483 src/applications/hydrodynamics/AnalyticalModel.cpp
484 src/applications/hydrodynamics/ApproximationModel.cpp
485 src/applications/hydrodynamics/BeadModel.cpp
486 src/applications/hydrodynamics/CompositeShape.cpp
487 src/applications/hydrodynamics/Hydro.cpp
488 src/applications/hydrodynamics/HydrodynamicsModel.cpp
489 src/applications/hydrodynamics/HydrodynamicsModelFactory.cpp
490 src/applications/hydrodynamics/RoughShell.cpp
491 src/applications/hydrodynamics/ShapeBuilder.cpp
492 src/applications/hydrodynamics/HydroCmd.cpp
493 )
494
495 set (STATICPROPSSOURCE
496 src/applications/staticProps/AngleR.cpp
497 src/applications/staticProps/BondAngleDistribution.cpp
498 src/applications/staticProps/BondOrderParameter.cpp
499 src/applications/staticProps/BOPofR.cpp
500 src/applications/staticProps/DensityPlot.cpp
501 src/applications/staticProps/GofAngle2.cpp
502 src/applications/staticProps/GofR.cpp
503 src/applications/staticProps/GofRAngle.cpp
504 src/applications/staticProps/GofRZ.cpp
505 src/applications/staticProps/GofXyz.cpp
506 src/applications/staticProps/GofZ.cpp
507 src/applications/staticProps/Hxy.cpp
508 src/applications/staticProps/NanoLength.cpp
509 src/applications/staticProps/NanoVolume.cpp
510 src/applications/staticProps/ObjectCount.cpp
511 src/applications/staticProps/P2OrderParameter.cpp
512 src/applications/staticProps/pAngle.cpp
513 src/applications/staticProps/RadialDistrFunc.cpp
514 src/applications/staticProps/RhoR.cpp
515 src/applications/staticProps/RhoZ.cpp
516 src/applications/staticProps/RippleOP.cpp
517 src/applications/staticProps/SCDOrderParameter.cpp
518 src/applications/staticProps/StaticProps.cpp
519 src/applications/staticProps/TetrahedralityParam.cpp
520 src/applications/staticProps/TwoDGofR.cpp
521 src/applications/staticProps/StaticPropsCmd.cpp
522 )
523
524 set (NANOPARTICLEBUILDERSOURCE
525 src/applications/nanoparticleBuilder/nanoparticleBuilder.cpp
526 src/applications/nanoparticleBuilder/shapedLatticeSpherical.cpp
527 src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.cpp
528 )
529
530 set (NANORODBUILDERSOURCE
531 src/applications/nanoparticleBuilder/nanorodBuilder.cpp
532 src/applications/nanoparticleBuilder/shapedLatticeRod.cpp
533 src/applications/nanoparticleBuilder/nanorodBuilderCmd.cpp
534 )
535
536 set (NANOROD_PENTBUILDERSOURCE
537 src/applications/nanoparticleBuilder/nanorod_pentBuilder.cpp
538 src/applications/nanoparticleBuilder/nanorod_pentBuilderCmd.cpp
539 src/applications/nanoparticleBuilder/shapedLatticePentRod.cpp
540 )
541
542 set (RANDOMBUILDERSOURCE
543 src/applications/randomBuilder/randomBuilder.cpp
544 src/applications/randomBuilder/randomBuilderCmd.cpp
545 )
546
547 set(SIMPLEBUILDERSOURCE
548 src/applications/simpleBuilder/simpleBuilder.cpp
549 src/applications/simpleBuilder/simpleBuilderCmd.cpp
550 )
551
552 set(THERMALIZERSOURCE
553 src/applications/thermalizer/thermalizer.cpp
554 src/applications/thermalizer/thermalizerCmd.cpp
555 )
556
557 add_executable(Dump2XYZ ${DUMP2XYZSOURCE})
558 target_link_libraries(Dump2XYZ openmd_single openmd_core openmd_single openmd_core)
559 add_executable(DynamicProps ${DYNAMICPROPSSOURCE})
560 target_link_libraries(DynamicProps openmd_single openmd_core openmd_single openmd_core)
561 add_executable(Hydro ${HYDROSOURCE})
562 target_link_libraries(Hydro openmd_single openmd_core openmd_single openmd_core)
563 add_executable(StaticProps ${STATICPROPSSOURCE})
564 target_link_libraries(StaticProps openmd_single openmd_core openmd_single openmd_core)
565 add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE})
566 target_link_libraries(nanoparticleBuilder openmd_single openmd_core openmd_single openmd_core)
567 add_executable(nanorodBuilder ${NANORODBUILDERSOURCE})
568 target_link_libraries(nanorodBuilder openmd_single openmd_core openmd_single openmd_core)
569 add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE})
570 target_link_libraries(nanorod_pentBuilder openmd_single openmd_core openmd_single openmd_core)
571 add_executable(randomBuilder ${RANDOMBUILDERSOURCE})
572 target_link_libraries(randomBuilder openmd_single openmd_core openmd_single openmd_core)
573 add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE})
574 target_link_libraries(simpleBuilder openmd_single openmd_core openmd_single openmd_core)
575 add_executable(thermalizer ${THERMALIZERSOURCE})
576 target_link_libraries(thermalizer openmd_single openmd_core openmd_single openmd_core)
577
578 if (OPENBABEL2_FOUND)
579 set (ATOM2MDSOURCE
580 src/applications/atom2md/atom2md.cpp
581 src/applications/atom2md/openmdformat.cpp
582 )
583 add_executable(atom2md ${ATOM2MDSOURCE})
584 target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES})
585 INSTALL(TARGETS atom2md RUNTIME DESTINATION bin
586 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
587 ENDIF (OPENBABEL2_FOUND)
588
589
590 set(PY_FILES
591 src/applications/hydrodynamics/diffExplainer
592 src/applications/utilities/affineScale
593 src/applications/utilities/dumpConverter
594 src/applications/utilities/md-solvator
595 src/applications/utilities/md2md
596 src/applications/utilities/mdSplit
597 src/applications/utilities/principalAxisCalculator
598 src/applications/utilities/stat2visco
599 src/applications/utilities/waterRotator
600 src/applications/utilities/waterReplacer
601 )
602
603 IF(PYTHON_EXECUTABLE)
604 foreach(PY_FILE ${PY_FILES})
605 GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME)
606 CONFIGURE_FILE(${PY_FILE}
607 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY)
608 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}"
609 DESTINATION bin
610 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
611 endforeach(PY_FILE)
612 ENDIF(PYTHON_EXECUTABLE)
613
614 set(PERL_FILES
615 src/applications/utilities/solvator
616 src/applications/utilities/waterBoxer
617 )
618
619 IF(PERL_FOUND)
620 foreach(PERL_FILE ${PERL_FILES})
621 GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME)
622 configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY)
623 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}"
624 DESTINATION bin
625 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
626
627 endforeach(PERL_FILE)
628 ENDIF(PERL_FOUND)
629
630 INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION .
631 PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
632 INSTALL(TARGETS
633 openmd_core
634 openmd_single
635 openmd
636 Dump2XYZ
637 simpleBuilder
638 StaticProps
639 DynamicProps
640 randomBuilder
641 nanoparticleBuilder
642 thermalizer
643 Hydro
644 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
645 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
646 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
647 )
648
649 install(DIRECTORY forceFields/
650 DESTINATION forceFields
651 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
652 PATTERN ".svn" EXCLUDE
653 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
654 install(DIRECTORY samples/
655 DESTINATION samples
656 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
657 PATTERN ".svn" EXCLUDE
658 PATTERN "*.dump" EXCLUDE
659 PATTERN "*.stat" EXCLUDE
660 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
661 INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf"
662 DESTINATION doc
663 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
664
665 message( STATUS)
666 message( STATUS "========== OpenMD Build Information ==========")
667 message( STATUS "Current revision ........... = ${SVN_REV}")
668 message( STATUS "CMAKE_SYSTEM ............... = ${CMAKE_SYSTEM}")
669 message( STATUS "==============================================")
670 message( STATUS "CMAKE_BUILD_TYPE ........... = ${CMAKE_BUILD_TYPE}")
671 message( STATUS "CMAKE_INSTALL_PREFIX ....... = ${CMAKE_INSTALL_PREFIX}")
672 message( STATUS "Build as SINGLE_PRECISION .. = ${SINGLE_PRECISION}")
673 message( STATUS "CMAKE_CXX_COMPILER ......... = ${CMAKE_CXX_COMPILER}")
674 message( STATUS "MPI_CXX_COMPILER ........... = ${MPI_CXX_COMPILER}")
675 message( STATUS "MPI_CXX_INCLUDE_PATH ....... = ${MPI_CXX_INCLUDE_PATH}")
676 message( STATUS "MPI_CXX_LIBRARIES .......... = ${MPI_CXX_LIBRARIES}")
677 message( STATUS "OPENBABEL2_ROOT ............ = ${OPENBABEL2_ROOT}")
678 message( STATUS "OPENBABEL2_INCLUDE_DIR ..... = ${OPENBABEL2_INCLUDE_DIR}")
679 message( STATUS "OPENBABEL2_LIBRARIES ....... = ${OPENBABEL2_LIBRARIES}")
680 message( STATUS "QHULL_ROOT ................. = ${QHULL_ROOT}")
681 message( STATUS "QHULL_INCLUDE_DIR .......... = ${QHULL_INCLUDE_DIR}")
682 message( STATUS "QHULL_LIBRARIES ............ = ${QHULL_LIBRARIES}")
683 message( STATUS "ZLIB_ROOT .................. = ${ZLIB_ROOT}")
684 message( STATUS "ZLIB_INCLUDE_DIR ........... = ${ZLIB_INCLUDE_DIR}")
685 message( STATUS "ZLIB_LIBRARIES ............. = ${ZLIB_LIBRARIES}")
686 message( STATUS "FFTW3_ROOT ................. = ${FFTW3_ROOT}")
687 message( STATUS "FFTW3_INCLUDE_DIR .......... = ${FFTW3_INCLUDE_DIR}")
688 message( STATUS "FFTW3_LIBRARIES ............ = ${FFTW3_LIBRARIES}")
689 message( STATUS "PERL_EXECUTABLE ............ = ${PERL_EXECUTABLE}")
690 message( STATUS "PYTHON_EXECUTABLE .......... = ${PYTHON_EXECUTABLE}")
691 message( STATUS "DOXYGEN_EXECUTABLE ......... = ${DOXYGEN_EXECUTABLE}")
692 message( STATUS )
693 message( STATUS "To override these options, add -D{OPTION_NAME}=... to the cmake command" )
694 message( STATUS "Particularly useful defines are for:")
695 message( STATUS )
696 message( STATUS " -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} (where OpenMD will be installed)")
697 message( STATUS " -DOPENBABEL2_ROOT=/path/to/openbabel")
698 message( STATUS " -DQHULL_ROOT=/path/to/qhull")
699 message( STATUS " -DFFTW3_ROOT=/path/to/fftw3")
700 message( STATUS )
701 message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"")
702 message( STATUS )