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 (12 years, 11 months ago) by gezelter
Content type: text/plain
File size: 24666 byte(s)
Log Message:
fixing some bugs, adding Shake

File Contents

# User Rev Content
1 chuckv 1466 # Top level cmake script for OpenMD.
2 gezelter 1694 project(OpenMD CXX)
3     cmake_minimum_required(VERSION 2.8.5)
4 chuckv 1466
5 gezelter 1668 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 gezelter 1694 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 gezelter 1668 include(CheckCXXCompilerFlag)
29 gezelter 1694 include(CheckIncludeFileCXX)
30     include(CheckCXXSymbolExists)
31 gezelter 1668
32 chuckv 1466 # OpenMD version number.
33 chuckv 1496 set (VERSION_MAJOR "2")
34     set (VERSION_MINOR "0")
35     set (VERSION_TINY "0")
36 gezelter 1668 option(SINGLE_PRECISION "Build Single precision (float) version" OFF)
37    
38 gezelter 1647 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 chuckv 1466
44 gezelter 1647 # ---------- 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 gezelter 1636 FIND_PACKAGE(Subversion)
64     IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn )
65     Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
66 gezelter 1694 MESSAGE(STATUS "Current revision is ${Project_WC_REVISION}")
67 gezelter 1636 Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
68     SET(SVN_REV ${Project_WC_REVISION})
69     ADD_DEFINITIONS( -DSVN_REV=${Project_WC_REVISION} )
70 gezelter 1652 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 gezelter 1636 ENDIF()
76    
77 gezelter 1694 check_include_file_cxx(conio.h HAVE_CONIO_H)
78     check_cxx_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP)
79 gezelter 1668
80 chuckv 1466 # Optional libraries: If we can find these, we will build with them
81     # Look for OpenBabel libraries
82 chuckv 1496 find_package(OpenBabel2)
83     IF(OPENBABEL2_FOUND)
84     SET(USE_OPENBABEL)
85     include_directories(${OPENBABEL2_INCLUDE_DIR})
86 gezelter 1694 # link libraries are added only for targets that need them.
87 gezelter 1695 ELSE(OPENBABEL2_FOUND)
88 gezelter 1705 MESSAGE(STATUS "No OpenBabel found - will not build atom2md")
89 chuckv 1496 ENDIF(OPENBABEL2_FOUND)
90    
91 gezelter 1743 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 chuckv 1466 #Look for QHULL Libraries
104 gezelter 1707 set(QHULL_USE_STATIC 1)
105 gezelter 1694 find_package(Qhull)
106 chuckv 1496 IF(QHULL_FOUND)
107     SET(HAVE_QHULL 1)
108 chuckv 1500 include_directories(${QHULL_INCLUDE_DIR})
109 chuckv 1496 LINK_LIBRARIES(${QHULL_LIBRARIES})
110 gezelter 1695 ELSE(QHULL_FOUND)
111 gezelter 1705 MESSAGE(STATUS "No Qhull found - will be missing some features")
112 chuckv 1496 ENDIF(QHULL_FOUND)
113 chuckv 1466
114 chuckv 1496 # 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 gezelter 1695 ELSE(ZLIB_FOUND)
122 gezelter 1705 MESSAGE(STATUS "No zlib found - will be missing compressed dump files")
123 chuckv 1496 endif(ZLIB_FOUND)
124    
125 gezelter 1695 #FFTW3
126 gezelter 1694 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 chuckv 1496 SET(HAVE_LIBFFTW 1)
134 gezelter 1668 SET(HAVE_FFTW3_H 1)
135 gezelter 1694 INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
136     LINK_LIBRARIES(${FFTW3_LIBRARIES})
137 gezelter 1695 ELSE(FFTW3_FOUND)
138 gezelter 1705 MESSAGE(STATUS "No fftw3 found - will be missing some analysis modules")
139 gezelter 1694 endif (FFTW3_FOUND)
140 chuckv 1496
141 gezelter 1694
142 gezelter 1651 # 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 chuckv 1496
153 gezelter 1639 FIND_PACKAGE(Perl)
154     IF(PERL_FOUND)
155     SET(PERL ${PERL_EXECUTABLE})
156     ELSE(PERL_FOUND)
157 gezelter 1695 MESSAGE(STATUS "Failed to find perl - some scripts will not be made")
158 gezelter 1639 ENDIF(PERL_FOUND)
159    
160 gezelter 1695 SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation
161     locations")
162    
163 gezelter 1639 FIND_PACKAGE(PythonInterp)
164     IF(PYTHON_EXECUTABLE)
165     SET(PYTHON ${PYTHON_EXECUTABLE})
166     ELSE(PYTHON_EXECUTABLE)
167 gezelter 1695 MESSAGE(STATUS "Failed to find python - some scripts will not be made")
168 gezelter 1639 ENDIF(PYTHON_EXECUTABLE)
169    
170 chuckv 1496 configure_file (
171     "${PROJECT_SOURCE_DIR}/src/config.h.cmake"
172 gezelter 1655 "${PROJECT_BINARY_DIR}/config.h"
173     )
174     include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src")
175 chuckv 1496
176 chuckv 1466 #Add executables for build
177 gezelter 1639 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 chuckv 1466
190 gezelter 1639 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 gezelter 1725 src/brains/ForceField.cpp
223 gezelter 1639 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 gezelter 1748 src/constraints/Shake.cpp
230 gezelter 1639 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 gezelter 1743 src/flucq/FluctuatingChargeParameters.cpp
236 gezelter 1731 src/flucq/FluctuatingChargeNVT.cpp
237 gezelter 1743 src/flucq/FluctuatingChargePropagator.cpp
238 gezelter 1639 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 gezelter 1710 src/io/FluctuatingChargeAtomTypesSectionParser.cpp
261 gezelter 1639 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 gezelter 1710 src/io/PolarizableAtomTypesSectionParser.cpp
272 gezelter 1639 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 gezelter 1743 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 gezelter 1746 src/optimization/MinimizerParameters.cpp
309 gezelter 1639 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 gezelter 1710 src/types/DirectionalAdapter.cpp
350     src/types/EAMAdapter.cpp
351     src/types/FixedChargeAdapter.cpp
352     src/types/FluctuatingChargeAdapter.cpp
353 gezelter 1639 src/types/FragmentStamp.cpp
354 gezelter 1710 src/types/GayBerneAdapter.cpp
355 gezelter 1639 src/types/ImproperCosineInversionType.cpp
356     src/types/InversionStamp.cpp
357 gezelter 1710 src/types/LennardJonesAdapter.cpp
358 gezelter 1639 src/types/MoleculeStamp.cpp
359 gezelter 1710 src/types/MultipoleAdapter.cpp
360 gezelter 1639 src/types/NonBondedInteractionType.cpp
361 gezelter 1710 src/types/PolarizableAdapter.cpp
362 gezelter 1639 src/types/RestraintStamp.cpp
363     src/types/RigidBodyStamp.cpp
364     src/types/ShapeAtomType.cpp
365 gezelter 1710 src/types/StickyAdapter.cpp
366     src/types/SuttonChenAdapter.cpp
367 gezelter 1639 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 gezelter 1731 src/rnemd/RNEMDParameters.cpp
387 gezelter 1639 )
388 chuckv 1466
389 gezelter 1639 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 gezelter 1743 src/flucq/FluctuatingChargeConstraints.cpp
396     src/flucq/FluctuatingChargeObjectiveFunction.cpp
397 gezelter 1730 src/integrators/LangevinHullForceManager.cpp
398 gezelter 1731 src/rnemd/RNEMD.cpp
399 gezelter 1639 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 gezelter 1668 src/utils/simError.cpp
414 gezelter 1743 src/optimization/Problem.cpp
415 gezelter 1639 )
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 gezelter 1647 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 gezelter 1639 ENDIF (MPI_FOUND)
455    
456     set (DUMP2XYZSOURCE
457     src/applications/dump2Xyz/Dump2XYZ.cpp
458 gezelter 1655 src/applications/dump2Xyz/Dump2XYZCmd.cpp
459 gezelter 1639 )
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 gezelter 1655 src/applications/dynamicProps/DynamicPropsCmd.cpp
480 gezelter 1639 )
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 gezelter 1655 src/applications/hydrodynamics/HydroCmd.cpp
493 gezelter 1639 )
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 gezelter 1655 src/applications/staticProps/StaticPropsCmd.cpp
522 gezelter 1639 )
523    
524     set (NANOPARTICLEBUILDERSOURCE
525     src/applications/nanoparticleBuilder/nanoparticleBuilder.cpp
526     src/applications/nanoparticleBuilder/shapedLatticeSpherical.cpp
527 gezelter 1655 src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.cpp
528 gezelter 1639 )
529    
530 kstocke1 1701 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 gezelter 1639 set (RANDOMBUILDERSOURCE
543     src/applications/randomBuilder/randomBuilder.cpp
544 gezelter 1655 src/applications/randomBuilder/randomBuilderCmd.cpp
545 gezelter 1639 )
546    
547     set(SIMPLEBUILDERSOURCE
548     src/applications/simpleBuilder/simpleBuilder.cpp
549 gezelter 1655 src/applications/simpleBuilder/simpleBuilderCmd.cpp
550 gezelter 1639 )
551    
552     set(THERMALIZERSOURCE
553     src/applications/thermalizer/thermalizer.cpp
554 gezelter 1655 src/applications/thermalizer/thermalizerCmd.cpp
555 gezelter 1639 )
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 kstocke1 1701 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 gezelter 1639 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 gezelter 1699 target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES})
585 gezelter 1647 INSTALL(TARGETS atom2md RUNTIME DESTINATION bin
586     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
587 gezelter 1639 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 gezelter 1668 src/applications/utilities/waterReplacer
601 gezelter 1639 )
602    
603     IF(PYTHON_EXECUTABLE)
604     foreach(PY_FILE ${PY_FILES})
605 gezelter 1647 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 gezelter 1639 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 gezelter 1647 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 gezelter 1639 endforeach(PERL_FILE)
628     ENDIF(PERL_FOUND)
629 gezelter 1647
630 gezelter 1652 INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION .
631 gezelter 1647 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 gezelter 1650 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
652     PATTERN ".svn" EXCLUDE
653 gezelter 1647 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
654     install(DIRECTORY samples/
655     DESTINATION samples
656 gezelter 1650 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
657     PATTERN ".svn" EXCLUDE
658 gezelter 1651 PATTERN "*.dump" EXCLUDE
659     PATTERN "*.stat" EXCLUDE
660 gezelter 1647 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
661 gezelter 1651 INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf"
662     DESTINATION doc
663     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
664 gezelter 1694
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 gezelter 1695 message( STATUS "Build as SINGLE_PRECISION .. = ${SINGLE_PRECISION}")
673 gezelter 1694 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 gezelter 1699 message( STATUS "OPENBABEL2_ROOT ............ = ${OPENBABEL2_ROOT}")
678 gezelter 1694 message( STATUS "OPENBABEL2_INCLUDE_DIR ..... = ${OPENBABEL2_INCLUDE_DIR}")
679     message( STATUS "OPENBABEL2_LIBRARIES ....... = ${OPENBABEL2_LIBRARIES}")
680 gezelter 1695 message( STATUS "QHULL_ROOT ................. = ${QHULL_ROOT}")
681 gezelter 1694 message( STATUS "QHULL_INCLUDE_DIR .......... = ${QHULL_INCLUDE_DIR}")
682     message( STATUS "QHULL_LIBRARIES ............ = ${QHULL_LIBRARIES}")
683 gezelter 1695 message( STATUS "ZLIB_ROOT .................. = ${ZLIB_ROOT}")
684 gezelter 1694 message( STATUS "ZLIB_INCLUDE_DIR ........... = ${ZLIB_INCLUDE_DIR}")
685     message( STATUS "ZLIB_LIBRARIES ............. = ${ZLIB_LIBRARIES}")
686 gezelter 1699 message( STATUS "FFTW3_ROOT ................. = ${FFTW3_ROOT}")
687 gezelter 1694 message( STATUS "FFTW3_INCLUDE_DIR .......... = ${FFTW3_INCLUDE_DIR}")
688     message( STATUS "FFTW3_LIBRARIES ............ = ${FFTW3_LIBRARIES}")
689 gezelter 1695 message( STATUS "PERL_EXECUTABLE ............ = ${PERL_EXECUTABLE}")
690     message( STATUS "PYTHON_EXECUTABLE .......... = ${PYTHON_EXECUTABLE}")
691 gezelter 1694 message( STATUS "DOXYGEN_EXECUTABLE ......... = ${DOXYGEN_EXECUTABLE}")
692 gezelter 1695 message( STATUS )
693 gezelter 1696 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 gezelter 1699 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 gezelter 1696 message( STATUS )
701     message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"")
702     message( STATUS )