ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
Revision: 1717
Committed: Wed May 23 01:30:47 2012 UTC (13 years, 2 months ago) by gezelter
Content type: text/plain
File size: 24123 byte(s)
Log Message:
Updating the build

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