ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/CMakeLists.txt
Revision: 1972
Committed: Fri Feb 28 13:47:41 2014 UTC (11 years, 4 months ago) by gezelter
Content type: text/plain
File size: 28191 byte(s)
Log Message:
Link ordering issue for FluctuatingChargeForces

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