ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
Revision: 1864
Committed: Fri Apr 12 21:21:45 2013 UTC (12 years, 3 months ago) by gezelter
Content type: text/plain
File size: 27739 byte(s)
Log Message:
Added an ellipsoidal shaped lattice

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 IF(WIN32)
12 ADD_DEFINITIONS(/D _CRT_SECURE_NO_WARNINGS)
13 ENDIF(WIN32)
14
15 find_package(MPI)
16 if (NOT MPI_CXX_FOUND)
17 message(STATUS "========== OpenMD Parallel Information ==========")
18 message(STATUS )
19 message(STATUS "No MPI compiler found. Perhaps you want to set one explicitly?")
20 message(STATUS "To override the default compiler, set the environment variable")
21 message(STATUS " export CXX=/full/path/to/mpic++")
22 message(STATUS "in bash or ksh or sh. In csh or tcsh, use:")
23 message(STATUS " setenv CXX /full/path/to/mpic++")
24 message(STATUS "before running the cmake command.")
25 message(STATUS )
26 message(STATUS "=================================================")
27 endif()
28 IF ( MPI_CXX_FOUND )
29 INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
30 ENDIF()
31
32 include(CheckCXXCompilerFlag)
33 include(CheckIncludeFileCXX)
34 include(CheckCXXSymbolExists)
35
36 # OpenMD version number.
37 set (VERSION_MAJOR "2")
38 set (VERSION_MINOR "1")
39 set (VERSION_TINY "0")
40 option(SINGLE_PRECISION "Build Single precision (float) version" OFF)
41
42 IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
43 IF(WIN32)
44 SET(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/openmd"
45 CACHE PATH "OpenMD install prefix" FORCE)
46 ELSE(WIN32)
47 SET(CMAKE_INSTALL_PREFIX "/usr/local/openmd"
48 CACHE PATH "OpenMD install prefix" FORCE)
49 ENDIF(WIN32)
50 ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
51 ADD_DEFINITIONS( -DFRC_PATH=${CMAKE_INSTALL_PREFIX}/forceFields )
52
53 # ---------- Setup output Directories -------------------------
54 SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
55 ${PROJECT_BINARY_DIR}/lib
56 CACHE PATH
57 "Single directory for all shared libraries"
58 )
59 # --------- Setup the Executable output Directory -------------
60 SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY
61 ${PROJECT_BINARY_DIR}/bin
62 CACHE PATH
63 "Single directory for all Executables."
64 )
65 # --------- Setup the static library directory -------------
66 SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
67 ${PROJECT_BINARY_DIR}/lib
68 CACHE PATH
69 "Single directory for all static libraries."
70 )
71
72 FIND_PACKAGE(Subversion)
73 IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn )
74 Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
75 MESSAGE(STATUS "Current revision is ${Project_WC_REVISION}")
76 Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
77 SET(SVN_REV ${Project_WC_REVISION})
78 ADD_DEFINITIONS( -DSVN_REV=${Project_WC_REVISION} )
79 SET(GENERATELOGS "${PROJECT_SOURCE_DIR}/doc/svn2cl")
80 ADD_CUSTOM_TARGET(ChangeLog
81 COMMAND ${GENERATELOGS} "--group-by-day" "--include-rev"
82 "--linelen=78" "--output=${PROJECT_BINARY_DIR}/ChangeLog" "${PROJECT_SOURCE_DIR}"
83 )
84 ELSE()
85 SET(SVN_REV Release)
86 ADD_DEFINITIONS( -DSVN_REV=Release )
87 ENDIF()
88
89 check_include_file_cxx(conio.h HAVE_CONIO_H)
90 check_cxx_symbol_exists(strncasecmp "string.h" HAVE_STRNCASECMP)
91
92 # Optional libraries: If we can find these, we will build with them
93 # Look for OpenBabel libraries
94 find_package(OpenBabel2)
95 IF(OPENBABEL2_FOUND)
96 SET(USE_OPENBABEL)
97 include_directories(${OPENBABEL2_INCLUDE_DIR})
98 # link libraries are added only for targets that need them.
99 ELSE(OPENBABEL2_FOUND)
100 MESSAGE(STATUS "No OpenBabel found - will not build atom2md")
101 ENDIF(OPENBABEL2_FOUND)
102
103 find_package(Eigen3)
104 if(EIGEN3_FOUND)
105 add_definitions(-DHAVE_EIGEN -DHAVE_EIGEN3)
106 include_directories(${EIGEN3_INCLUDE_DIR})
107 else()
108 find_package(Eigen2) # find and setup Eigen2
109 if(EIGEN2_FOUND)
110 add_definitions (-DHAVE_EIGEN)
111 include_directories(${EIGEN2_INCLUDE_DIR})
112 endif()
113 endif()
114
115 #Look for QHULL Libraries
116 find_package(Qhull)
117 IF(QHULL_FOUND)
118 SET(HAVE_QHULL 1)
119 include_directories(${QHULL_INCLUDE_DIR})
120 LINK_LIBRARIES(${QHULL_LIBRARIES})
121 ELSE(QHULL_FOUND)
122 MESSAGE(STATUS "No Qhull found - will be missing some features")
123 ENDIF(QHULL_FOUND)
124
125 # zlib stuff
126 find_package(ZLIB)
127 if(ZLIB_FOUND)
128 SET(HAVE_LIBZ 1)
129 add_definitions(-DHAVE_LIBZ)
130 include_directories(${ZLIB_INCLUDE_DIR})
131 LINK_LIBRARIES(${ZLIB_LIBRARIES})
132 ELSE(ZLIB_FOUND)
133 MESSAGE(STATUS "No zlib found - will be missing compressed dump files")
134 endif(ZLIB_FOUND)
135
136 #FFTW3
137 IF(SINGLE_PRECISION)
138 find_package(FFTW3 COMPONENTS single)
139 else()
140 find_package(FFTW3 COMPONENTS double)
141 endif(SINGLE_PRECISION)
142 if (FFTW3_FOUND)
143 include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${FFTW3_INCLUDE_DIR})
144 SET(HAVE_LIBFFTW 1)
145 SET(HAVE_FFTW3_H 1)
146 INCLUDE_DIRECTORIES(${FFTW3_INCLUDE_DIR})
147 LINK_LIBRARIES(${FFTW3_LIBRARIES})
148 ELSE(FFTW3_FOUND)
149 MESSAGE(STATUS "No fftw3 found - will be missing some analysis modules")
150 endif (FFTW3_FOUND)
151
152
153 # add a target to generate API documentation with Doxygen
154 find_package(Doxygen)
155 if(DOXYGEN_FOUND)
156 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile" @ONLY)
157 add_custom_target(doc
158 ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doc/Doxyfile"
159 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc"
160 COMMENT "Generating API documentation with Doxygen" VERBATIM
161 )
162 endif(DOXYGEN_FOUND)
163
164 FIND_PACKAGE(Perl)
165 IF(PERL_FOUND)
166 SET(PERL ${PERL_EXECUTABLE})
167 ELSE(PERL_FOUND)
168 MESSAGE(STATUS "Failed to find perl - some scripts will not be made")
169 ENDIF(PERL_FOUND)
170
171 SET(PERL_INSTALLDIRS "site" CACHE STRING "Perl installation
172 locations")
173
174 FIND_PACKAGE(PythonInterp)
175 IF(PYTHON_EXECUTABLE)
176 SET(PYTHON ${PYTHON_EXECUTABLE})
177 ELSE(PYTHON_EXECUTABLE)
178 MESSAGE(STATUS "Failed to find python - some scripts will not be made")
179 ENDIF(PYTHON_EXECUTABLE)
180
181 configure_file (
182 "${PROJECT_SOURCE_DIR}/src/config.h.cmake"
183 "${PROJECT_BINARY_DIR}/config.h"
184 )
185 include_directories("${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/src")
186
187 #Add executables for build
188 set (PROGRAMS
189 openmd
190 openmd_MPI
191 Dump2XYZ
192 simpleBuilder
193 StaticProps
194 DynamicProps
195 randomBuilder
196 nanoparticleBuilder
197 thermalizer
198 recenter
199 atom2md
200 Hydro)
201
202 set(SOURCE
203 src/antlr/ANTLRUtil.cpp
204 src/antlr/ASTFactory.cpp
205 src/antlr/ASTNULLType.cpp
206 src/antlr/ASTRefCount.cpp
207 src/antlr/BaseAST.cpp
208 src/antlr/BitSet.cpp
209 src/antlr/CharBuffer.cpp
210 src/antlr/CharScanner.cpp
211 src/antlr/CommonAST.cpp
212 src/antlr/CommonASTWithHiddenTokens.cpp
213 src/antlr/CommonHiddenStreamToken.cpp
214 src/antlr/CommonToken.cpp
215 src/antlr/InputBuffer.cpp
216 src/antlr/LLkParser.cpp
217 src/antlr/MismatchedCharException.cpp
218 src/antlr/MismatchedTokenException.cpp
219 src/antlr/NoViableAltException.cpp
220 src/antlr/NoViableAltForCharException.cpp
221 src/antlr/Parser.cpp
222 src/antlr/RecognitionException.cpp
223 src/antlr/String.cpp
224 src/antlr/Token.cpp
225 src/antlr/TokenBuffer.cpp
226 src/antlr/TokenRefCount.cpp
227 src/antlr/TokenStreamBasicFilter.cpp
228 src/antlr/TokenStreamHiddenTokenFilter.cpp
229 src/antlr/TokenStreamRewriteEngine.cpp
230 src/antlr/TokenStreamSelector.cpp
231 src/antlr/TreeParser.cpp
232 src/brains/BlockSnapshotManager.cpp
233 src/brains/DataStorage.cpp
234 src/brains/ForceField.cpp
235 src/brains/MoleculeCreator.cpp
236 src/brains/PairList.cpp
237 src/brains/Register.cpp
238 src/brains/SimSnapshotManager.cpp
239 src/brains/Snapshot.cpp
240 src/brains/Stats.cpp
241 src/constraints/Shake.cpp
242 src/constraints/Rattle.cpp
243 src/hydrodynamics/Ellipsoid.cpp
244 src/hydrodynamics/HydroProp.cpp
245 src/hydrodynamics/Sphere.cpp
246 src/integrators/DLM.cpp
247 src/flucq/FluctuatingChargeLangevin.cpp
248 src/flucq/FluctuatingChargeParameters.cpp
249 src/flucq/FluctuatingChargeNVT.cpp
250 src/flucq/FluctuatingChargePropagator.cpp
251 src/integrators/Integrator.cpp
252 src/integrators/IntegratorFactory.cpp
253 src/integrators/LangevinDynamics.cpp
254 src/integrators/LDForceManager.cpp
255 src/integrators/NgammaT.cpp
256 src/integrators/NPAT.cpp
257 src/integrators/NPrT.cpp
258 src/integrators/NPT.cpp
259 src/integrators/NPTf.cpp
260 src/integrators/NPTi.cpp
261 src/integrators/NPTsz.cpp
262 src/integrators/NPTxyz.cpp
263 src/integrators/NVE.cpp
264 src/integrators/NVT.cpp
265 src/integrators/VelocityVerletIntegrator.cpp
266 src/io/AtomTypesSectionParser.cpp
267 src/io/BaseAtomTypesSectionParser.cpp
268 src/io/BendTypesSectionParser.cpp
269 src/io/BondTypesSectionParser.cpp
270 src/io/ChargeAtomTypesSectionParser.cpp
271 src/io/DirectionalAtomTypesSectionParser.cpp
272 src/io/EAMAtomTypesSectionParser.cpp
273 src/io/FluctuatingChargeAtomTypesSectionParser.cpp
274 src/io/ForceFieldOptions.cpp
275 src/io/GayBerneAtomTypesSectionParser.cpp
276 src/io/Globals.cpp
277 src/io/InversionTypesSectionParser.cpp
278 src/io/LennardJonesAtomTypesSectionParser.cpp
279 src/io/MultipoleAtomTypesSectionParser.cpp
280 src/io/NonBondedInteractionsSectionParser.cpp
281 src/io/OptionSectionParser.cpp
282 src/io/ParamConstraint.cpp
283 src/io/PolarizableAtomTypesSectionParser.cpp
284 src/io/SCAtomTypesSectionParser.cpp
285 src/io/SectionParser.cpp
286 src/io/SectionParserManager.cpp
287 src/io/ShapeAtomTypesSectionParser.cpp
288 src/io/StickyAtomTypesSectionParser.cpp
289 src/io/StickyPowerAtomTypesSectionParser.cpp
290 src/io/TorsionTypesSectionParser.cpp
291 src/io/ZConsReader.cpp
292 src/lattice/CubicLattice.cpp
293 src/lattice/FCCLattice.cpp
294 src/lattice/Lattice.cpp
295 src/lattice/LatticeFactory.cpp
296 src/lattice/shapedLattice.cpp
297 src/math/ChebyshevT.cpp
298 src/math/ChebyshevU.cpp
299 src/math/CubicSpline.cpp
300 src/math/LegendrePolynomial.cpp
301 src/math/RealSphericalHarmonic.cpp
302 src/math/RMSD.cpp
303 src/math/SeqRandNumGen.cpp
304 src/math/SphericalHarmonic.cpp
305 src/math/Wigner3jm.cpp
306 src/mdParser/FilenameObserver.cpp
307 src/mdParser/MDLexer.cpp
308 src/mdParser/MDParser.cpp
309 src/mdParser/MDTreeParser.cpp
310 src/optimization/OptimizationFactory.cpp
311 src/optimization/Armijo.cpp
312 src/optimization/BFGS.cpp
313 src/optimization/ConjugateGradient.cpp
314 src/optimization/Constraint.cpp
315 src/optimization/EndCriteria.cpp
316 src/optimization/LineSearch.cpp
317 src/optimization/LineSearchBasedMethod.cpp
318 src/optimization/SteepestDescent.cpp
319 src/optimization/PotentialEnergyObjectiveFunction.cpp
320 src/optimization/MinimizerParameters.cpp
321 src/nonbonded/EAM.cpp
322 src/nonbonded/Electrostatic.cpp
323 src/nonbonded/GB.cpp
324 src/nonbonded/InteractionManager.cpp
325 src/nonbonded/LJ.cpp
326 src/nonbonded/MAW.cpp
327 src/nonbonded/Morse.cpp
328 src/nonbonded/RepulsivePower.cpp
329 src/nonbonded/SC.cpp
330 src/nonbonded/Sticky.cpp
331 src/nonbonded/SwitchingFunction.cpp
332 src/primitives/Atom.cpp
333 src/primitives/Bend.cpp
334 src/primitives/DirectionalAtom.cpp
335 src/primitives/GhostBend.cpp
336 src/primitives/GhostTorsion.cpp
337 src/primitives/Inversion.cpp
338 src/primitives/Molecule.cpp
339 src/primitives/RigidBody.cpp
340 src/primitives/StuntDouble.cpp
341 src/primitives/Torsion.cpp
342 src/primitives/UreyBradleyBend.cpp
343 src/perturbations/ElectricField.cpp
344 src/restraints/MolecularRestraint.cpp
345 src/restraints/ObjectRestraint.cpp
346 src/selection/HullFinder.cpp
347 src/selection/IndexFinder.cpp
348 src/selection/NameFinder.cpp
349 src/selection/SelectionCompiler.cpp
350 src/selection/SelectionEvaluator.cpp
351 src/selection/SelectionManager.cpp
352 src/selection/SelectionToken.cpp
353 src/selection/TokenMap.cpp
354 src/types/AtomStamp.cpp
355 src/types/AtomType.cpp
356 src/types/BendStamp.cpp
357 src/types/BondStamp.cpp
358 src/types/CharmmTorsionType.cpp
359 src/types/Component.cpp
360 src/types/CutoffGroupStamp.cpp
361 src/types/DirectionalAdapter.cpp
362 src/types/EAMAdapter.cpp
363 src/types/FixedChargeAdapter.cpp
364 src/types/FluctuatingChargeAdapter.cpp
365 src/types/FragmentStamp.cpp
366 src/types/GayBerneAdapter.cpp
367 src/types/ImproperCosineInversionType.cpp
368 src/types/InversionStamp.cpp
369 src/types/LennardJonesAdapter.cpp
370 src/types/MoleculeStamp.cpp
371 src/types/MultipoleAdapter.cpp
372 src/types/NonBondedInteractionType.cpp
373 src/types/PolarizableAdapter.cpp
374 src/types/RestraintStamp.cpp
375 src/types/RigidBodyStamp.cpp
376 src/types/ShapeAtomType.cpp
377 src/types/StickyAdapter.cpp
378 src/types/SuttonChenAdapter.cpp
379 src/types/TorsionStamp.cpp
380 src/types/ZconsStamp.cpp
381 src/utils/ElementsTable.cpp
382 src/utils/MoLocator.cpp
383 src/utils/PropertyMap.cpp
384 src/utils/StringTokenizer.cpp
385 src/utils/StringUtils.cpp
386 src/utils/Trim.cpp
387 src/utils/Utility.cpp
388 src/utils/wildcards.cpp
389 src/visitors/AtomNameVisitor.cpp
390 src/visitors/AtomVisitor.cpp
391 src/visitors/CompositeVisitor.cpp
392 src/visitors/LipidTransVisitor.cpp
393 src/visitors/OtherVisitor.cpp
394 src/visitors/ReplacementVisitor.cpp
395 src/visitors/RigidBodyVisitor.cpp
396 src/visitors/ZconsVisitor.cpp
397 src/rnemd/RNEMDParameters.cpp
398 src/clusters/Icosahedron.cpp
399 src/clusters/Decahedron.cpp
400 )
401
402 set( PARALLEL_SOURCE
403 src/brains/ForceManager.cpp
404 src/brains/SimCreator.cpp
405 src/brains/SimInfo.cpp
406 src/brains/Thermo.cpp
407 src/constraints/ZconstraintForceManager.cpp
408 src/flucq/FluctuatingChargeConstraints.cpp
409 src/flucq/FluctuatingChargeObjectiveFunction.cpp
410 src/integrators/LangevinHullForceManager.cpp
411 src/rnemd/RNEMD.cpp
412 src/integrators/Velocitizer.cpp
413 src/io/DumpReader.cpp
414 src/io/DumpWriter.cpp
415 src/io/RestReader.cpp
416 src/io/RestWriter.cpp
417 src/io/StatWriter.cpp
418 src/io/ZConsWriter.cpp
419 src/io/ifstrstream.cpp
420 src/math/ParallelRandNumGen.cpp
421 src/parallel/ForceDecomposition.cpp
422 src/parallel/ForceMatrixDecomposition.cpp
423 src/restraints/RestraintForceManager.cpp
424 src/restraints/ThermoIntegrationForceManager.cpp
425 src/selection/DistanceFinder.cpp
426 src/utils/ProgressBar.cpp
427 src/utils/simError.cpp
428 src/utils/OpenMDBitSet.cpp
429 src/optimization/Problem.cpp
430 )
431
432 IF(ZLIB_FOUND)
433 set(ZLIB_SOURCE
434 src/io/gzstream.cpp
435 )
436 ENDIF(ZLIB_FOUND)
437
438 IF(QHULL_FOUND)
439 set(QHULL_SOURCE
440 src/integrators/LangevinHullDynamics.cpp
441 src/math/Triangle.cpp
442 )
443 set(QHULL_PARALLEL_SOURCE
444 src/integrators/LangevinHullForceManager.cpp
445 src/math/ConvexHull.cpp
446 src/math/AlphaHull.cpp
447 )
448 ENDIF(QHULL_FOUND)
449
450 IF(WIN32)
451 set(GETOPT_SOURCE
452 src/utils/wingetopt.cpp
453 )
454 ENDIF(WIN32)
455
456 add_library(openmd_core STATIC ${SOURCE} ${QHULL_SOURCE} ${ZLIB_SOURCE} )
457 add_library(openmd_single STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
458
459 IF(MPI_FOUND)
460 add_library(openmd_parallel STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
461 set_target_properties(openmd_parallel PROPERTIES
462 COMPILE_DEFINITIONS IS_MPI
463 )
464 ENDIF(MPI_FOUND)
465
466 add_executable(openmd src/applications/openmd/openmd.cpp)
467 target_link_libraries(openmd openmd_single openmd_core openmd_single openmd_core)
468
469 if (MPI_FOUND)
470 add_executable(openmd_MPI src/applications/openmd/openmd.cpp)
471 set_target_properties(openmd_MPI PROPERTIES
472 COMPILE_DEFINITIONS IS_MPI
473 )
474 target_link_libraries(openmd_MPI openmd_parallel openmd_core openmd_parallel openmd_core)
475 INSTALL(TARGETS
476 openmd_parallel openmd_MPI
477 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
478 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
479 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
480 )
481 ENDIF (MPI_FOUND)
482
483 set (DUMP2XYZSOURCE
484 src/applications/dump2Xyz/Dump2XYZ.cpp
485 src/applications/dump2Xyz/Dump2XYZCmd.cpp
486 )
487
488 set (DYNAMICPROPSSOURCE
489 src/applications/dynamicProps/ActionCorrFunc.cpp
490 src/applications/dynamicProps/CrossTimeCorrFunc.cpp
491 src/applications/dynamicProps/DipoleCorrFunc.cpp
492 src/applications/dynamicProps/DirectionalRCorrFunc.cpp
493 src/applications/dynamicProps/DynamicProps.cpp
494 src/applications/dynamicProps/EnergyCorrFunc.cpp
495 src/applications/dynamicProps/FrameTimeCorrFunc.cpp
496 src/applications/dynamicProps/LegendreCorrFunc.cpp
497 src/applications/dynamicProps/MomentumCorrFunc.cpp
498 src/applications/dynamicProps/ParticleTimeCorrFunc.cpp
499 src/applications/dynamicProps/RadialRCorrFunc.cpp
500 src/applications/dynamicProps/RCorrFunc.cpp
501 src/applications/dynamicProps/SelectionCorrFunc.cpp
502 src/applications/dynamicProps/StressCorrFunc.cpp
503 src/applications/dynamicProps/SystemDipoleCorrFunc.cpp
504 src/applications/dynamicProps/ThetaCorrFunc.cpp
505 src/applications/dynamicProps/TimeCorrFunc.cpp
506 src/applications/dynamicProps/VCorrFunc.cpp
507 src/applications/dynamicProps/DynamicPropsCmd.cpp
508 )
509
510 set (HYDROSOURCE
511 src/applications/hydrodynamics/AnalyticalModel.cpp
512 src/applications/hydrodynamics/ApproximationModel.cpp
513 src/applications/hydrodynamics/BeadModel.cpp
514 src/applications/hydrodynamics/CompositeShape.cpp
515 src/applications/hydrodynamics/Hydro.cpp
516 src/applications/hydrodynamics/HydrodynamicsModel.cpp
517 src/applications/hydrodynamics/HydrodynamicsModelFactory.cpp
518 src/applications/hydrodynamics/RoughShell.cpp
519 src/applications/hydrodynamics/ShapeBuilder.cpp
520 src/applications/hydrodynamics/HydroCmd.cpp
521 )
522
523 set (STATICPROPSSOURCE
524 src/applications/staticProps/AngleR.cpp
525 src/applications/staticProps/BondAngleDistribution.cpp
526 src/applications/staticProps/BondOrderParameter.cpp
527 src/applications/staticProps/BOPofR.cpp
528 src/applications/staticProps/DensityPlot.cpp
529 src/applications/staticProps/GofAngle2.cpp
530 src/applications/staticProps/GofR.cpp
531 src/applications/staticProps/GofRAngle.cpp
532 src/applications/staticProps/GofRZ.cpp
533 src/applications/staticProps/GofXyz.cpp
534 src/applications/staticProps/GofZ.cpp
535 src/applications/staticProps/Hxy.cpp
536 src/applications/staticProps/NanoLength.cpp
537 src/applications/staticProps/NanoVolume.cpp
538 src/applications/staticProps/ObjectCount.cpp
539 src/applications/staticProps/P2OrderParameter.cpp
540 src/applications/staticProps/pAngle.cpp
541 src/applications/staticProps/RadialDistrFunc.cpp
542 src/applications/staticProps/RhoR.cpp
543 src/applications/staticProps/RhoZ.cpp
544 src/applications/staticProps/RippleOP.cpp
545 src/applications/staticProps/SCDOrderParameter.cpp
546 src/applications/staticProps/StaticProps.cpp
547 src/applications/staticProps/TetrahedralityParam.cpp
548 src/applications/staticProps/TetrahedralityParamZ.cpp
549 src/applications/staticProps/TwoDGofR.cpp
550 src/applications/staticProps/StaticPropsCmd.cpp
551 )
552
553 set (NANOPARTICLEBUILDERSOURCE
554 src/applications/nanoparticleBuilder/nanoparticleBuilder.cpp
555 src/applications/nanoparticleBuilder/shapedLatticeSpherical.cpp
556 src/applications/nanoparticleBuilder/nanoparticleBuilderCmd.cpp
557 )
558
559 set (NANORODBUILDERSOURCE
560 src/applications/nanoparticleBuilder/nanorodBuilder.cpp
561 src/applications/nanoparticleBuilder/shapedLatticeRod.cpp
562 src/applications/nanoparticleBuilder/shapedLatticeEllipsoid.cpp
563 src/applications/nanoparticleBuilder/nanorodBuilderCmd.cpp
564 )
565
566 set (NANOROD_PENTBUILDERSOURCE
567 src/applications/nanoparticleBuilder/nanorod_pentBuilder.cpp
568 src/applications/nanoparticleBuilder/nanorod_pentBuilderCmd.cpp
569 src/applications/nanoparticleBuilder/shapedLatticePentRod.cpp
570 )
571
572 set (ICOSAHEDRALBUILDERSOURCE
573 src/applications/nanoparticleBuilder/icosahedralBuilder.cpp
574 src/applications/nanoparticleBuilder/icosahedralBuilderCmd.cpp
575 )
576
577 set (RANDOMBUILDERSOURCE
578 src/applications/randomBuilder/randomBuilder.cpp
579 src/applications/randomBuilder/randomBuilderCmd.cpp
580 )
581
582 set(SIMPLEBUILDERSOURCE
583 src/applications/simpleBuilder/simpleBuilder.cpp
584 src/applications/simpleBuilder/simpleBuilderCmd.cpp
585 )
586
587 set(THERMALIZERSOURCE
588 src/applications/thermalizer/thermalizer.cpp
589 src/applications/thermalizer/thermalizerCmd.cpp
590 )
591
592 set(RECENTERSOURCE
593 src/applications/recenter/recenter.cpp
594 src/applications/recenter/recenterCmd.cpp
595 )
596
597 add_executable(Dump2XYZ ${DUMP2XYZSOURCE} ${GETOPT_SOURCE})
598 target_link_libraries(Dump2XYZ openmd_single openmd_core openmd_single openmd_core)
599 add_executable(DynamicProps ${DYNAMICPROPSSOURCE} ${GETOPT_SOURCE})
600 target_link_libraries(DynamicProps openmd_single openmd_core openmd_single openmd_core)
601 add_executable(Hydro ${HYDROSOURCE} ${GETOPT_SOURCE})
602 target_link_libraries(Hydro openmd_single openmd_core openmd_single openmd_core)
603 add_executable(StaticProps ${STATICPROPSSOURCE} ${GETOPT_SOURCE})
604 target_link_libraries(StaticProps openmd_single openmd_core openmd_single openmd_core)
605 add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE} ${GETOPT_SOURCE})
606 target_link_libraries(nanoparticleBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
607 add_executable(nanorodBuilder ${NANORODBUILDERSOURCE} ${GETOPT_SOURCE})
608 target_link_libraries(nanorodBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
609 add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE} ${GETOPT_SOURCE})
610 target_link_libraries(nanorod_pentBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
611 add_executable(icosahedralBuilder ${ICOSAHEDRALBUILDERSOURCE} ${GETOPT_SOURCE})
612 target_link_libraries(icosahedralBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
613 add_executable(randomBuilder ${RANDOMBUILDERSOURCE} ${GETOPT_SOURCE})
614 target_link_libraries(randomBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
615 add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE} ${GETOPT_SOURCE})
616 target_link_libraries(simpleBuilder openmd_single openmd_core openmd_single openmd_core openmd_single)
617 add_executable(thermalizer ${THERMALIZERSOURCE} ${GETOPT_SOURCE})
618 target_link_libraries(thermalizer openmd_single openmd_core openmd_single openmd_core openmd_single)
619 add_executable(recenter ${RECENTERSOURCE} ${GETOPT_SOURCE})
620 target_link_libraries(recenter openmd_single openmd_core openmd_single openmd_core openmd_single)
621
622 if (OPENBABEL2_FOUND)
623 set (ATOM2MDSOURCE
624 src/applications/atom2md/atom2md.cpp
625 src/applications/atom2md/openmdformat.cpp
626 )
627 add_executable(atom2md ${ATOM2MDSOURCE} ${GETOPT_SOURCE})
628 target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES})
629 INSTALL(TARGETS atom2md RUNTIME DESTINATION bin
630 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
631 ENDIF (OPENBABEL2_FOUND)
632
633
634 set(PY_FILES
635 src/applications/hydrodynamics/diffExplainer
636 src/applications/utilities/affineScale
637 src/applications/utilities/dumpConverter
638 src/applications/utilities/md-solvator
639 src/applications/utilities/md2md
640 src/applications/utilities/mdSplit
641 src/applications/utilities/principalAxisCalculator
642 src/applications/utilities/stat2thcond
643 src/applications/utilities/stat2visco
644 src/applications/utilities/waterRotator
645 src/applications/utilities/waterReplacer
646 )
647
648 IF(PYTHON_EXECUTABLE)
649 IF(WIN32)
650 SET(PYEXT ".py")
651 ELSE(WIN32)
652 SET(PYEXT "")
653 ENDIF(WIN32)
654
655 foreach(PY_FILE ${PY_FILES})
656 GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME)
657 CONFIGURE_FILE(${PY_FILE}
658 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}" @ONLY)
659 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}"
660 DESTINATION bin
661 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
662 endforeach(PY_FILE)
663 ENDIF(PYTHON_EXECUTABLE)
664
665 set(PERL_FILES
666 src/applications/utilities/solvator
667 src/applications/utilities/waterBoxer
668 )
669
670 IF(PERL_FOUND)
671 IF(WIN32)
672 SET(PLEXT ".PL")
673 ELSE(WIN32)
674 SET(PLEXT "")
675 ENDIF(WIN32)
676
677 foreach(PERL_FILE ${PERL_FILES})
678 GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME)
679 configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}" @ONLY)
680 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}"
681 DESTINATION bin
682 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
683
684 endforeach(PERL_FILE)
685 ENDIF(PERL_FOUND)
686
687
688 INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION .
689 PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
690 INSTALL(TARGETS
691 openmd_core
692 openmd_single
693 openmd
694 Dump2XYZ
695 simpleBuilder
696 StaticProps
697 DynamicProps
698 randomBuilder
699 nanoparticleBuilder
700 nanorodBuilder
701 nanorod_pentBuilder
702 thermalizer
703 recenter
704 Hydro
705 RUNTIME DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
706 LIBRARY DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
707 ARCHIVE DESTINATION lib PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
708 )
709
710 install(DIRECTORY forceFields/
711 DESTINATION forceFields
712 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
713 PATTERN ".svn" EXCLUDE
714 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
715 install(DIRECTORY samples/
716 DESTINATION samples
717 DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
718 PATTERN ".svn" EXCLUDE
719 PATTERN "*.dump" EXCLUDE
720 PATTERN "*.stat" EXCLUDE
721 PATTERN "*.eor" EXCLUDE
722 PATTERN "*.rnemd" EXCLUDE
723 PATTERN "*.fz" EXCLUDE
724 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
725
726 configure_file( samples/builders/runMe.in
727 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runMe" @ONLY)
728 INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runMe"
729 DESTINATION samples/builders
730 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
731
732
733 INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf"
734 DESTINATION doc
735 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
736
737 message( STATUS)
738 message( STATUS "========== OpenMD Build Information ==========")
739 message( STATUS "Current revision ........... = ${SVN_REV}")
740 message( STATUS "CMAKE_SYSTEM ............... = ${CMAKE_SYSTEM}")
741 message( STATUS "==============================================")
742 message( STATUS "CMAKE_BUILD_TYPE ........... = ${CMAKE_BUILD_TYPE}")
743 message( STATUS "CMAKE_INSTALL_PREFIX ....... = ${CMAKE_INSTALL_PREFIX}")
744 message( STATUS "Build as SINGLE_PRECISION .. = ${SINGLE_PRECISION}")
745 message( STATUS "CMAKE_CXX_COMPILER ......... = ${CMAKE_CXX_COMPILER}")
746 message( STATUS "MPI_CXX_COMPILER ........... = ${MPI_CXX_COMPILER}")
747 message( STATUS "MPI_CXX_INCLUDE_PATH ....... = ${MPI_CXX_INCLUDE_PATH}")
748 message( STATUS "MPI_CXX_LIBRARIES .......... = ${MPI_CXX_LIBRARIES}")
749 message( STATUS "OPENBABEL2_ROOT ............ = ${OPENBABEL2_ROOT}")
750 message( STATUS "OPENBABEL2_INCLUDE_DIR ..... = ${OPENBABEL2_INCLUDE_DIR}")
751 message( STATUS "OPENBABEL2_LIBRARIES ....... = ${OPENBABEL2_LIBRARIES}")
752 message( STATUS "QHULL_ROOT ................. = ${QHULL_ROOT}")
753 message( STATUS "QHULL_INCLUDE_DIR .......... = ${QHULL_INCLUDE_DIR}")
754 message( STATUS "QHULL_LIBRARIES ............ = ${QHULL_LIBRARIES}")
755 message( STATUS "ZLIB_ROOT .................. = ${ZLIB_ROOT}")
756 message( STATUS "ZLIB_INCLUDE_DIR ........... = ${ZLIB_INCLUDE_DIR}")
757 message( STATUS "ZLIB_LIBRARIES ............. = ${ZLIB_LIBRARIES}")
758 message( STATUS "FFTW3_ROOT ................. = ${FFTW3_ROOT}")
759 message( STATUS "FFTW3_INCLUDE_DIR .......... = ${FFTW3_INCLUDE_DIR}")
760 message( STATUS "FFTW3_LIBRARIES ............ = ${FFTW3_LIBRARIES}")
761 message( STATUS "PERL_EXECUTABLE ............ = ${PERL_EXECUTABLE}")
762 message( STATUS "PYTHON_EXECUTABLE .......... = ${PYTHON_EXECUTABLE}")
763 message( STATUS "DOXYGEN_EXECUTABLE ......... = ${DOXYGEN_EXECUTABLE}")
764 message( STATUS )
765 message( STATUS "To override these options, add -D{OPTION_NAME}=... to the cmake command" )
766 message( STATUS "Particularly useful defines are for:")
767 message( STATUS )
768 message( STATUS " -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} (where OpenMD will be installed)")
769 message( STATUS " -DOPENBABEL2_ROOT=/path/to/openbabel")
770 message( STATUS " -DQHULL_ROOT=/path/to/qhull")
771 message( STATUS " -DFFTW3_ROOT=/path/to/fftw3")
772 message( STATUS )
773 IF(WIN32)
774 message( STATUS "To build and install OpenMD, enter: ")
775 message( STATUS " msbuild /m ALL_BUILD.vcxproj /p:Configuration=${CMAKE_BUILD_TYPE}")
776 message( STATUS "followed by:")
777 message( STATUS " msbuild /m INSTALL.vcxproj /p:Configuration=${CMAKE_BUILD_TYPE}")
778 ELSE(WIN32)
779 message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"")
780 ENDIF(WIN32)
781 message( STATUS )
782
783 # build a CPack driven installer package
784 IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
785 SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
786 ENDIF()
787 include (InstallRequiredSystemLibraries)
788 set (CPACK_RESOURCE_FILE_LICENSE
789 "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
790 set (CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
791 set (CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
792 include (CPack)