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 1495 by chuckv, Fri Jul 9 23:13:29 2010 UTC vs.
Revision 1496 by chuckv, Wed Sep 8 20:42:24 2010 UTC

# Line 5 | Line 5 | project(OpenMD)
5  
6  
7   # OpenMD version number.
8 < set (OpenMD_VERSION_MAJOR 2)
9 < set (OpenMD_VERSION_MINOR 0)
10 < set (OpenMD_VERSION_TINY 0)  q
8 > set (VERSION_MAJOR "2")
9 > set (VERSION_MINOR "0")
10 > set (VERSION_TINY "0")  
11  
12   # cmake modules that are needed to build oopse
13   set (CMAKE_MODULE_PATH ${OpenMD_SOURCE_DIR}/cmake/modules)
# Line 16 | Line 16 | enable_language( Fortran C  CXX)
16   enable_language( Fortran C  CXX)
17  
18  
19 configure_file (
20  "${PROJECT_SOURCE_DIR}/Config.h.in"
21  "${PROJECT_BINARY_DIR}/Config.h"
22  )
19  
20   # Figure out compiler stuff. We need to know which c, c++ and fortran
21 <  compiler we are using as well as the name magling stuff.
22 < FortranCInterface_HEADER(FC.h MACRO_NAMESPACE "FC_" FROM_LIBRARY blas[daxpy])
21 > #  compiler we are using as well as the name magling stuff.
22 > INCLUDE(FortranCInterface)
23 > FortranCInterface_VERIFY(CXX)
24 > FortranCInterface_HEADER( ${PROJECT_SOURCE_DIR}/src/config_f.h
25 >                            MACRO_NAMESPACE "FC_"
26 >                            SYMBOL_NAMESPACE "FC_")
27  
28  
29  
30
30   # Optional libraries: If we can find these, we will build with them
31   # Look for OpenBabel libraries
32 < find_package(OpenBabel)
32 > find_package(OpenBabel2)
33 > IF(OPENBABEL2_FOUND)
34 >  SET(USE_OPENBABEL)
35 >  include_directories(${OPENBABEL2_INCLUDE_DIR})
36 >  message(STATUS "Openbabel libs: " ${OPENBABEL2_LIBRARIES})
37 > #  TARGET_LINK_LIBRARIES(${OPENBABEL2_LIBRARIES})
38 > ENDIF(OPENBABEL2_FOUND)
39 >
40   #Look for QHULL Libraries
41   find_package(QHULL)
42 + IF(QHULL_FOUND)
43 +  SET(HAVE_QHULL 1)
44 +  LINK_LIBRARIES(${QHULL_LIBRARIES})
45 + ENDIF(QHULL_FOUND)
46  
37
47   #Figure out MPI stuff
48 + find_package(MPI)
49 + if(MPI_FOUND)
50 + SET(IS_MPI 1)
51 + #add_definitions(-DIS_MPI)
52 + endif(MPI_FOUND)
53  
54 + #Add subversion Information
55 + find_package(Subversion)
56 + if(Subversion_FOUND)
57 +  Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} ER)
58 +  set(SUBVERSION_REVISION ${ER_WC_REVISION})
59 + endif(Subversion_FOUND)
60 + set(CPACK_PACKAGE_VERSION_PATCH "${SUBVERSION_REVISION}")
61  
62 + # zlib stuff
63 + find_package(ZLIB)
64 + if(ZLIB_FOUND)
65 +  SET(HAVE_LIBZ 1)
66 +  add_definitions(-DHAVE_LIBZ)
67 +  include_directories(${ZLIB_INCLUDE_DIR})
68 +  LINK_LIBRARIES(${ZLIB_LIBRARIES})
69 + endif(ZLIB_FOUND)
70 +
71 + #FFTW
72 + INCLUDE(${CMAKE_MODULE_PATH}/FindFFTW.cmake)
73 + IF(FFTW_FOUND)
74 +  SET(HAVE_LIBFFTW 1)
75 +  SET(HAVE_FFTW3_H)
76 +  INCLUDE_DIRECTORIES(${FFTW_INCLUDE_DIR})
77 +  LINK_LIBRARIES(${FFTW_LIBRARIES})
78 + ENDIF(FFTW_FOUND)
79 +
80 +
81 + #include checks
82 + include(CheckIncludeFile)
83 + CHECK_INCLUDE_FILE(fftw3.h HAVE_FFTW3_H)
84 + CHECK_INCLUDE_FILE(fftw.h HAVE_FFWT_H)
85 + CHECK_INCLUDE_FILE(dfftw.h HAVE_DFFTW_H)
86 + CHECK_INCLUDE_FILE(cmath.h HAVE_CMATH_H)
87 + check_include_file (errno.h HAVE_ERRNO_H)
88 + check_include_file (inttypes.h HAVE_INTTYPES_H)
89 + check_include_file (limits.h HAVE_LIMITS_H)
90 + check_include_file (math.h HAVE_MATH_H)
91 + check_include_file (memory.h HAVE_MEMORY_H)
92 + check_include_file (stdint.h HAVE_STDINT_H)
93 + check_include_file (stdio.h HAVE_STDIO_H)
94 + check_include_file (stdlib.h HAVE_STDLIB_H)
95 + check_include_file (strings.h HAVE_STRINGS_H)
96 + check_include_file (string.h HAVE_STRING_H)
97 + check_include_file ("sys/param.h" HAVE_SYS_PARAM_H)
98 + check_include_file ("sys/pstat.h" HAVE_SYS_PSTAT_H)
99 + check_include_file ("sys/select.h" HAVE_SYS_SELECT_H)
100 + check_include_file ("sys/socket.h" HAVE_SYS_SOCKET_H)
101 + check_include_file ("sys/stat.h" HAVE_SYS_STAT_H)
102 + check_include_file ("sys/sysctl.h" HAVE_SYS_SYSCTL_H)
103 + check_include_file ("sys/sysinfo.h" HAVE_SYS_SYSINFO_H)
104 + check_include_file ("sys/param.h" HAVE_SYS_PARAM_H)
105 + check_include_file ("sys/sysmp.h" HAVE_SYS_SYSMP_H)
106 + check_include_file ("sys/systemcfg.h" HAVE_SYS_SYSTEMCFG_H)
107 + check_include_file ("sys/table.h" HAVE_SYS_TABLE_H)
108 +
109 +
110 +
111 + find_path (HAVE_SYS_STAT_H stat.h
112 +  PATHS ${include_locations}
113 +  PATH_SUFFIXES sys
114 + )
115 +
116 + find_path (HAVE_SYS_TYPES_H types.h
117 +  PATHS ${include_locations}
118 +  PATH_SUFFIXES sys
119 + )
120 + find_path (HAVE_UNISTD_H unistd.h ${include_locations})
121 +
122 + #symbol checks
123 + include(CheckSymbolExists)
124 +
125 +
126 + #function checks
127 + include(CheckFunctionExists)
128 + check_function_exists(floor HAVE_FLOOR)
129 + check_function_exists (memset HAVE_MEMSET)
130 + check_function_exists (pow HAVE_POW)
131 + check_function_exists (sqrt HAVE_SQRT)
132 + check_function_exists (strchr HAVE_STRCHR)
133 + check_function_exists (strstr HAVE_STRSTR)
134 + check_function_exists (sysmp HAVE_SYSMP)
135 + check_function_exists (table HAVE_TABLE)
136 +
137 +
138 +
139 + include(CMakePrintSystemInformation)
140 +
141 + configure_file (
142 +  "${PROJECT_SOURCE_DIR}/src/config.h.cmake"
143 +  "${PROJECT_SOURCE_DIR}/src/config.h"
144 +  )
145 + include_directories (${PROJECT_SOURCE_DIR}/src)
146 +
147 + #CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
148 +
149 +
150 +
151   #Add executables for build
152   set (PROGRAMS openmd Dump2XYZ simpleBuilder StaticProps DynamicProps
153   randomBuilder nanoparticleBuilder thermalizer atom2md Hydro)
154   # Example of how to set core libraries
155   #set(CORELIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} m)
156  
157 < foreach(program ${PROGRAMS})
158 <  add_executable(${program} ${program}.cpp)
159 <  target_link_libraries(${program} ${CORELIBS})
160 < endforeach(program)
157 > #foreach(program ${PROGRAMS})
158 > #  add_executable(${program} ${program}.cpp)
159 > #  target_link_libraries(${program} ${CORELIBS})
160 > #endforeach(program)
161  
162 + #add_subdirectory(src/lattice)
163 + #add_subdirectory(src/brains)
164 + #add_subdirectory(src/UseTheForce)
165  
166  
54
167   #Add subirectories for build
168  
169  
170 < add_subdirectory(src)
170 > #add_subdirectory(src)
171 > add_subdirectory(lib)
172 > add_subdirectory(bin)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines