ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/CMakeLists.txt
Revision: 1790
Committed: Thu Aug 30 17:18:22 2012 UTC (12 years, 11 months ago) by gezelter
Content type: text/plain
File size: 25712 byte(s)
Log Message:
Various Windows compilation fixes

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