ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/CMakeLists.txt
(Generate patch)

Comparing branches/development/CMakeLists.txt (file contents):
Revision 1725 by gezelter, Sat May 26 18:13:43 2012 UTC vs.
Revision 1803 by gezelter, Wed Oct 3 14:20:07 2012 UTC

# Line 8 | Line 8 | endif()
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 ==========")
# Line 88 | Line 92 | ENDIF(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)
# Line 214 | Line 230 | src/brains/Stats.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/integrators/FluctuatingChargeNVT.cpp
240 < src/integrators/FluctuatingChargePropagator.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
# Line 247 | Line 266 | src/io/Globals.cpp
266   src/io/ForceFieldOptions.cpp
267   src/io/GayBerneAtomTypesSectionParser.cpp
268   src/io/Globals.cpp
250 src/io/gzstream.cpp
269   src/io/InversionTypesSectionParser.cpp
270   src/io/LennardJonesAtomTypesSectionParser.cpp
271   src/io/MultipoleAtomTypesSectionParser.cpp
# Line 281 | Line 299 | src/mdParser/MDTreeParser.cpp
299   src/mdParser/MDLexer.cpp
300   src/mdParser/MDParser.cpp
301   src/mdParser/MDTreeParser.cpp
302 < src/minimizers/MinimizerFactory.cpp
303 < src/minimizers/MinimizerParameterSet.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
# Line 305 | Line 332 | src/primitives/UreyBradleyBend.cpp
332   src/primitives/StuntDouble.cpp
333   src/primitives/Torsion.cpp
334   src/primitives/UreyBradleyBend.cpp
335 + src/perturbations/ElectricField.cpp
336   src/restraints/MolecularRestraint.cpp
337   src/restraints/ObjectRestraint.cpp
310 src/selection/DistanceFinder.cpp
338   src/selection/HullFinder.cpp
339   src/selection/IndexFinder.cpp
340   src/selection/NameFinder.cpp
# Line 345 | Line 372 | src/utils/MoLocator.cpp
372   src/types/ZconsStamp.cpp
373   src/utils/ElementsTable.cpp
374   src/utils/MoLocator.cpp
348 src/utils/OpenMDBitSet.cpp
375   src/utils/PropertyMap.cpp
376   src/utils/StringTokenizer.cpp
377   src/utils/StringUtils.cpp
# Line 360 | Line 386 | src/visitors/ZconsVisitor.cpp
386   src/visitors/ReplacementVisitor.cpp
387   src/visitors/RigidBodyVisitor.cpp
388   src/visitors/ZconsVisitor.cpp
389 + src/rnemd/RNEMDParameters.cpp
390   )
391  
392   set( PARALLEL_SOURCE
# Line 368 | Line 395 | src/constraints/ZconstraintForceManager.cpp
395   src/brains/SimInfo.cpp
396   src/brains/Thermo.cpp
397   src/constraints/ZconstraintForceManager.cpp
398 < src/integrators/RNEMD.cpp
398 > src/flucq/FluctuatingChargeConstraints.cpp
399 > src/flucq/FluctuatingChargeObjectiveFunction.cpp
400 > src/integrators/LangevinHullForceManager.cpp
401 > src/rnemd/RNEMD.cpp
402   src/integrators/Velocitizer.cpp
403   src/io/DumpReader.cpp
404   src/io/DumpWriter.cpp
# Line 378 | Line 408 | src/math/ParallelRandNumGen.cpp
408   src/io/ZConsWriter.cpp
409   src/io/ifstrstream.cpp
410   src/math/ParallelRandNumGen.cpp
381 src/minimizers/CGFamilyMinimizer.cpp
382 src/minimizers/Minimizer.cpp
383 src/minimizers/PRCG.cpp
384 src/minimizers/SDMinimizer.cpp
411   src/parallel/ForceDecomposition.cpp
412   src/parallel/ForceMatrixDecomposition.cpp
413   src/restraints/RestraintForceManager.cpp
414   src/restraints/ThermoIntegrationForceManager.cpp
415 + src/selection/DistanceFinder.cpp
416   src/utils/ProgressBar.cpp
417   src/utils/simError.cpp
418 + src/utils/OpenMDBitSet.cpp
419 + src/optimization/Problem.cpp
420   )
421  
422 + IF(ZLIB_FOUND)
423 + set(ZLIB_SOURCE
424 + src/io/gzstream.cpp
425 + )
426 + ENDIF(ZLIB_FOUND)
427 +
428   IF(QHULL_FOUND)
429   set(QHULL_SOURCE
430   src/integrators/LangevinHullDynamics.cpp
# Line 402 | Line 437 | ENDIF(QHULL_FOUND)
437   )
438   ENDIF(QHULL_FOUND)
439  
440 < add_library(openmd_core STATIC ${SOURCE} ${QHULL_SOURCE} )
440 > IF(WIN32)
441 > set(GETOPT_SOURCE
442 > src/utils/wingetopt.cpp
443 > )
444 > ENDIF(WIN32)
445 >
446 > add_library(openmd_core STATIC ${SOURCE} ${QHULL_SOURCE} ${ZLIB_SOURCE} )
447   add_library(openmd_single STATIC ${PARALLEL_SOURCE} ${QHULL_PARALLEL_SOURCE} )
448  
449   IF(MPI_FOUND)
# Line 493 | Line 534 | src/applications/staticProps/TetrahedralityParam.cpp
534   src/applications/staticProps/SCDOrderParameter.cpp
535   src/applications/staticProps/StaticProps.cpp
536   src/applications/staticProps/TetrahedralityParam.cpp
537 + src/applications/staticProps/TetrahedralityParamZ.cpp
538   src/applications/staticProps/TwoDGofR.cpp
539   src/applications/staticProps/StaticPropsCmd.cpp
540   )
# Line 530 | Line 572 | src/applications/thermalizer/thermalizerCmd.cpp
572   src/applications/thermalizer/thermalizerCmd.cpp
573   )
574  
575 < add_executable(Dump2XYZ ${DUMP2XYZSOURCE})
575 > add_executable(Dump2XYZ ${DUMP2XYZSOURCE} ${GETOPT_SOURCE})
576   target_link_libraries(Dump2XYZ openmd_single openmd_core openmd_single openmd_core)
577 < add_executable(DynamicProps ${DYNAMICPROPSSOURCE})
577 > add_executable(DynamicProps ${DYNAMICPROPSSOURCE} ${GETOPT_SOURCE})
578   target_link_libraries(DynamicProps openmd_single openmd_core openmd_single openmd_core)
579 < add_executable(Hydro ${HYDROSOURCE})
579 > add_executable(Hydro ${HYDROSOURCE} ${GETOPT_SOURCE})
580   target_link_libraries(Hydro openmd_single openmd_core openmd_single openmd_core)
581 < add_executable(StaticProps ${STATICPROPSSOURCE})
581 > add_executable(StaticProps ${STATICPROPSSOURCE} ${GETOPT_SOURCE})
582   target_link_libraries(StaticProps openmd_single openmd_core openmd_single openmd_core)
583 < add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE})
583 > add_executable(nanoparticleBuilder ${NANOPARTICLEBUILDERSOURCE} ${GETOPT_SOURCE})
584   target_link_libraries(nanoparticleBuilder openmd_single openmd_core openmd_single openmd_core)
585 < add_executable(nanorodBuilder ${NANORODBUILDERSOURCE})
585 > add_executable(nanorodBuilder ${NANORODBUILDERSOURCE} ${GETOPT_SOURCE})
586   target_link_libraries(nanorodBuilder openmd_single openmd_core openmd_single openmd_core)
587 < add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE})
587 > add_executable(nanorod_pentBuilder ${NANOROD_PENTBUILDERSOURCE} ${GETOPT_SOURCE})
588   target_link_libraries(nanorod_pentBuilder openmd_single openmd_core openmd_single openmd_core)
589 < add_executable(randomBuilder ${RANDOMBUILDERSOURCE})
589 > add_executable(randomBuilder ${RANDOMBUILDERSOURCE} ${GETOPT_SOURCE})
590   target_link_libraries(randomBuilder openmd_single openmd_core openmd_single openmd_core)
591 < add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE})
591 > add_executable(simpleBuilder ${SIMPLEBUILDERSOURCE} ${GETOPT_SOURCE})
592   target_link_libraries(simpleBuilder openmd_single openmd_core openmd_single openmd_core)
593 < add_executable(thermalizer ${THERMALIZERSOURCE})
593 > add_executable(thermalizer ${THERMALIZERSOURCE} ${GETOPT_SOURCE})
594   target_link_libraries(thermalizer openmd_single openmd_core openmd_single openmd_core)
595  
596   if (OPENBABEL2_FOUND)
# Line 556 | Line 598 | src/applications/atom2md/openmdformat.cpp
598   src/applications/atom2md/atom2md.cpp
599   src/applications/atom2md/openmdformat.cpp
600   )
601 <  add_executable(atom2md ${ATOM2MDSOURCE})
601 >  add_executable(atom2md ${ATOM2MDSOURCE} ${GETOPT_SOURCE})
602    target_link_libraries(atom2md openmd_single openmd_core openmd_single openmd_core ${OPENBABEL2_LIBRARIES})
603    INSTALL(TARGETS atom2md RUNTIME DESTINATION bin
604            PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
# Line 571 | Line 613 | src/applications/utilities/principalAxisCalculator
613   src/applications/utilities/md2md
614   src/applications/utilities/mdSplit
615   src/applications/utilities/principalAxisCalculator
616 + src/applications/utilities/stat2thcond
617   src/applications/utilities/stat2visco
618   src/applications/utilities/waterRotator
619   src/applications/utilities/waterReplacer
620   )
621  
622   IF(PYTHON_EXECUTABLE)
623 <   foreach(PY_FILE ${PY_FILES})
624 <      GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME)
625 <      CONFIGURE_FILE(${PY_FILE}
626 <                     "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY)
627 <      INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}"
628 <              DESTINATION bin
629 <              PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
630 <   endforeach(PY_FILE)
623 >  IF(WIN32)
624 >    SET(PYEXT ".py")
625 >  ELSE(WIN32)
626 >    SET(PYEXT "")
627 >  ENDIF(WIN32)
628 >
629 >  foreach(PY_FILE ${PY_FILES})
630 >    GET_FILENAME_COMPONENT(filename "${PY_FILE}" NAME)
631 >    CONFIGURE_FILE(${PY_FILE}
632 >                  "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}" @ONLY)
633 >    INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PYEXT}"
634 >            DESTINATION bin
635 >            PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
636 >  endforeach(PY_FILE)
637   ENDIF(PYTHON_EXECUTABLE)
638  
639   set(PERL_FILES
# Line 593 | Line 642 | IF(PERL_FOUND)
642   )
643  
644   IF(PERL_FOUND)
645 <   foreach(PERL_FILE ${PERL_FILES})
646 <      GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME)
647 <      configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}" @ONLY)
648 <      INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}"
649 <              DESTINATION bin
601 <              PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
645 >  IF(WIN32)
646 >    SET(PLEXT ".PL")
647 >  ELSE(WIN32)
648 >    SET(PLEXT "")
649 >  ENDIF(WIN32)
650  
651 <   endforeach(PERL_FILE)
651 >  foreach(PERL_FILE ${PERL_FILES})
652 >     GET_FILENAME_COMPONENT(filename "${PERL_FILE}" NAME)
653 >     configure_file(${PERL_FILE} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}" @ONLY)
654 >     INSTALL(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${filename}${PLEXT}"
655 >             DESTINATION bin
656 >             PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
657 >
658 >  endforeach(PERL_FILE)
659   ENDIF(PERL_FOUND)
660  
661   INSTALL(FILES AUTHORS LICENSE README INSTALL DESTINATION .
# Line 633 | Line 688 | install(DIRECTORY samples/      
688          PATTERN ".svn" EXCLUDE
689          PATTERN "*.dump" EXCLUDE
690          PATTERN "*.stat" EXCLUDE
691 +        PATTERN "*.eor" EXCLUDE
692 +        PATTERN "*.rnemd" EXCLUDE
693          PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
694   INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/OpenMDmanual.pdf"
695          DESTINATION doc
# Line 676 | Line 733 | message( STATUS )
733   message( STATUS )
734   message( STATUS "To build and install OpenMD, enter \"make\" and \"make install\"")
735   message( STATUS )
736 +
737 + # build a CPack driven installer package
738 + IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
739 +   SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
740 + ENDIF()
741 + include (InstallRequiredSystemLibraries)
742 + set (CPACK_RESOURCE_FILE_LICENSE  
743 +     "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
744 + set (CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
745 + set (CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
746 + include (CPack)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines