ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
Revision: 1696
Committed: Fri Mar 16 15:24:02 2012 UTC (13 years, 2 months ago) by gezelter
Content type: text/plain
File size: 22956 byte(s)
Log Message:
tweaking build process

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