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 1635 by gezelter, Tue Sep 13 15:39:54 2011 UTC vs.
Revision 1636 by gezelter, Thu Sep 15 19:08:55 2011 UTC

# Line 15 | Line 15 | enable_language(CXX  C)
15   enable_language(CXX  C)
16  
17  
18 + if ( APPLE )
19 + set(MPI_COMPILER /opt/local/lib/openmpi/bin/mpic++)
20 + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" )
21 + endif( APPLE )
22 + FIND_PACKAGE(MPI)
23 + IF ( MPI_FOUND )
24 +  SET(CMAKE_REQUIRED_INCLUDES "${MPI_INCLUDE_PATH};${CMAKE_REQUIRED_INCLUDES}")
25 +  INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
26 + ENDIF()
27 +
28 + FIND_PACKAGE(Subversion)
29 + IF ( Subversion_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.svn )
30 +  Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
31 +  MESSAGE("Current revision is ${Project_WC_REVISION}")
32 +  Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
33 +  SET(SVN_REV ${Project_WC_REVISION})
34 +  ADD_DEFINITIONS( -DSVN_REV=${Project_WC_REVISION} )
35 + ENDIF()
36 +
37   # Optional libraries: If we can find these, we will build with them
38   # Look for OpenBabel libraries
39   find_package(OpenBabel2)
# Line 33 | Line 52 | ENDIF(QHULL_FOUND)
52    LINK_LIBRARIES(${QHULL_LIBRARIES})
53   ENDIF(QHULL_FOUND)
54  
36 #Figure out MPI stuff
37 find_package(MPI)
38 if(MPI_FOUND)
39 SET(IS_MPI 1)
40 #add_definitions(-DIS_MPI)
41 endif(MPI_FOUND)
55  
43 #Add subversion Information
44 find_package(Subversion)
45 if(Subversion_FOUND)
46  Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} ER)
47  set(SUBVERSION_REVISION ${ER_WC_REVISION})
48 endif(Subversion_FOUND)
49 set(CPACK_PACKAGE_VERSION_PATCH "${SUBVERSION_REVISION}")
50
56   # zlib stuff
57   find_package(ZLIB)
58   if(ZLIB_FOUND)
# Line 73 | Line 78 | CHECK_INCLUDE_FILE(cmath.h HAVE_CMATH_H)
78   CHECK_INCLUDE_FILE(fftw.h HAVE_FFWT_H)
79   CHECK_INCLUDE_FILE(dfftw.h HAVE_DFFTW_H)
80   CHECK_INCLUDE_FILE(cmath.h HAVE_CMATH_H)
81 < check_include_file (errno.h HAVE_ERRNO_H)
82 < check_include_file (inttypes.h HAVE_INTTYPES_H)
83 < check_include_file (limits.h HAVE_LIMITS_H)
84 < check_include_file (math.h HAVE_MATH_H)
85 < check_include_file (memory.h HAVE_MEMORY_H)
81 < check_include_file (stdint.h HAVE_STDINT_H)
82 < check_include_file (stdio.h HAVE_STDIO_H)
83 < check_include_file (stdlib.h HAVE_STDLIB_H)
84 < check_include_file (strings.h HAVE_STRINGS_H)
85 < check_include_file (string.h HAVE_STRING_H)
86 < check_include_file ("sys/param.h" HAVE_SYS_PARAM_H)
87 < check_include_file ("sys/pstat.h" HAVE_SYS_PSTAT_H)
88 < check_include_file ("sys/select.h" HAVE_SYS_SELECT_H)
89 < check_include_file ("sys/socket.h" HAVE_SYS_SOCKET_H)
90 < check_include_file ("sys/stat.h" HAVE_SYS_STAT_H)
91 < check_include_file ("sys/sysctl.h" HAVE_SYS_SYSCTL_H)
92 < check_include_file ("sys/sysinfo.h" HAVE_SYS_SYSINFO_H)
93 < check_include_file ("sys/param.h" HAVE_SYS_PARAM_H)
94 < check_include_file ("sys/sysmp.h" HAVE_SYS_SYSMP_H)
95 < check_include_file ("sys/systemcfg.h" HAVE_SYS_SYSTEMCFG_H)
96 < check_include_file ("sys/table.h" HAVE_SYS_TABLE_H)
81 > check_include_file(limits.h HAVE_LIMITS_H)
82 > check_include_file(stdlib.h HAVE_STDLIB_H)
83 > check_include_file(string.h HAVE_STRING_H)
84 > check_include_file("sys/ioctl.h" HAVE_SYS_IOCTL_H)
85 > check_include_file(unistd.h HAVE_UNISTD_H)
86  
98 find_path (HAVE_SYS_STAT_H stat.h
99  PATHS ${include_locations}
100  PATH_SUFFIXES sys
101 )
102
103 find_path (HAVE_SYS_TYPES_H types.h
104  PATHS ${include_locations}
105  PATH_SUFFIXES sys
106 )
107 find_path (HAVE_UNISTD_H unistd.h ${include_locations})
108
87   #symbol checks
88   include(CheckSymbolExists)
89  
112
90   #function checks
91   include(CheckFunctionExists)
92 + check_function_exists(atexit HAVE_ATEXIT)
93   check_function_exists(floor HAVE_FLOOR)
94 < check_function_exists (memset HAVE_MEMSET)
95 < check_function_exists (pow HAVE_POW)
96 < check_function_exists (sqrt HAVE_SQRT)
97 < check_function_exists (strchr HAVE_STRCHR)
98 < check_function_exists (strstr HAVE_STRSTR)
99 < check_function_exists (sysmp HAVE_SYSMP)
100 < check_function_exists (table HAVE_TABLE)
94 > check_function_exists(pow HAVE_POW)
95 > check_function_exists(select HAVE_SELECT)
96 > check_function_exists(sqrt HAVE_SQRT)
97 > check_function_exists(strcasecmp HAVE_STRCASECMP)
98 > check_function_exists(strchr HAVE_STRCHR)
99 > check_function_exists(strdup HAVE_STRDUP)
100 > check_function_exists(strncasecmp HAVE_STRNCASECMP)
101 > check_function_exists(strstr HAVE_STRSTR)
102 > check_function_exists(strtol HAVE_STRTOL)
103 > check_function_exists(strtoull HAVE_STRTOULL)
104 > check_function_exists(sysmp HAVE_SYSMP)
105 > check_function_exists(table HAVE_TABLE)
106  
107  
125
108   include(CMakePrintSystemInformation)
109  
110   configure_file (
# Line 134 | Line 116 | include_directories (${PROJECT_SOURCE_DIR}/src)
116   #CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
117  
118  
137
119   #Add executables for build
120 < set (PROGRAMS openmd Dump2XYZ simpleBuilder StaticProps DynamicProps
120 > set (PROGRAMS openmd openmd_MPI Dump2XYZ simpleBuilder StaticProps DynamicProps
121   randomBuilder nanoparticleBuilder thermalizer atom2md Hydro)
122   # Example of how to set core libraries
123   #set(CORELIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} m)
124  
144 #foreach(program ${PROGRAMS})
145 #  add_executable(${program} ${program}.cpp)
146 #  target_link_libraries(${program} ${CORELIBS})
147 #endforeach(program)
148
149 #add_subdirectory(src/lattice)
150 #add_subdirectory(src/brains)
151 #add_subdirectory(src/UseTheForce)
152
153
125   #Add subirectories for build
126  
156
157 #add_subdirectory(src)
127   add_subdirectory(lib)
128   add_subdirectory(bin)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines