ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
Revision: 1767
Committed: Fri Jul 6 22:01:58 2012 UTC (13 years ago) by gezelter
Content type: text/plain
File size: 25150 byte(s)
Log Message:
Various fixes required to compile OpenMD with the MS Visual C++ compiler

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