Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

CMakeLists.txt 13.7 KB
Newer Older
1
project(AMDiS)
Naumann, Andreas's avatar
Naumann, Andreas committed
2

3
cmake_minimum_required(VERSION 2.6)
4

Naumann, Andreas's avatar
Naumann, Andreas committed
5 6
#needs: --enable-debug, enable-intel --enable-openmp --enable-parmetis --enable-parallel-domain --enable-umfpack --enable-mkl --enable-boost --enable-marmot

7 8
SET(LIB_DIR ${AMDiS_SOURCE_DIR}/lib)
SET(SOURCE_DIR ${AMDiS_SOURCE_DIR}/src)
9

10
#TODO: use the cmake build type
11 12
SET(MTL_DIR ${LIB_DIR}/mtl4/ CACHE PATH "mtl4 directory")

13 14 15 16 17 18 19 20
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -Wall -DDEBUG=0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -DDEBUG=1 -O0")

#define the build type, empty can be everything and nothing
if(CMAKE_BUILD_TYPE STREQUAL "")
	set(CMAKE_BUILD_TYPE "Release")
endif()

Naumann, Andreas's avatar
Naumann, Andreas committed
21 22
#option(ENABLE_INTEL "use intel compiler" false)
option(ENABLE_PARALLEL_DOMAIN "use parallel domain decomposition" false)
Naumann, Andreas's avatar
Naumann, Andreas committed
23
option(USE_PETSC_DEV false)
24
#parmetis is not optional
Naumann, Andreas's avatar
Naumann, Andreas committed
25 26
set(ENABLE_PARMETIS false)
option(ENABLE_ZOLTAN false)
Naumann, Andreas's avatar
Naumann, Andreas committed
27
option(ENABLE_UMFPACK "use umfpack solver" false)
28
option(ENABLE_TESTS "compile the tests" false)
Naumann, Andreas's avatar
Naumann, Andreas committed
29 30 31 32 33 34 35 36 37

if(ENABLE_INTEL)
	Message("please set the icc manually")
	INCLUDE (CMakeForceCompiler)
	CMAKE_FORCE_C_COMPILER(icc "intel C compiler")
	CMAKE_FORCE_CXX_COMPILER(icpc "intel C++ compiler")
	#SET(CMAKE_C_COMPILER "icc")
endif(ENABLE_INTEL)

38 39 40 41 42 43 44 45 46 47 48
find_package(Boost 1.42 REQUIRED)
if(Boost_FOUND)
  include_directories(${Boost_INCLUDE_DIR})
  message("boost lib-dirs: ${Boost_LIBRARY_DIRS}")
  message("use the boost dir: ${Boost_INCLUDE_DIR}")
  if(WIN32)
	message("the windows find_boost does not set the boost library paths, please set it")
	SET(Boost_LIBRARY_DIRS CACHE PATH "The directory containing the boost libraries")
  endif(WIN32)		
  link_directories(${Boost_LIBRARY_DIRS})
endif(Boost_FOUND)
Naumann, Andreas's avatar
Naumann, Andreas committed
49

Thomas Witkowski's avatar
Thomas Witkowski committed
50 51
SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
	      ${SOURCE_DIR}/AdaptInfo.cc
52
	      ${SOURCE_DIR}/AdaptInstationary.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
	      ${SOURCE_DIR}/AdaptStationary.cc
	      ${SOURCE_DIR}/Assembler.cc
	      ${SOURCE_DIR}/BasisFunction.cc
	      ${SOURCE_DIR}/Boundary.cc
	      ${SOURCE_DIR}/BoundaryManager.cc
	      ${SOURCE_DIR}/Cholesky.cc
	      ${SOURCE_DIR}/CoarseningManager.cc
	      ${SOURCE_DIR}/CoarseningManager1d.cc
	      ${SOURCE_DIR}/CoarseningManager2d.cc
	      ${SOURCE_DIR}/CoarseningManager3d.cc
	      ${SOURCE_DIR}/ComponentTraverseInfo.cc
	      ${SOURCE_DIR}/CreatorMap.cc
	      ${SOURCE_DIR}/DOFAdmin.cc
	      ${SOURCE_DIR}/DOFIndexed.cc
	      ${SOURCE_DIR}/DOFMatrix.cc
	      ${SOURCE_DIR}/DOFVector.cc
Naumann, Andreas's avatar
Naumann, Andreas committed
69
	      ${SOURCE_DIR}/Debug.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
	      ${SOURCE_DIR}/DirichletBC.cc
	      ${SOURCE_DIR}/DualTraverse.cc
	      ${SOURCE_DIR}/ElInfo.cc
	      ${SOURCE_DIR}/ElInfo1d.cc
	      ${SOURCE_DIR}/ElInfo2d.cc
	      ${SOURCE_DIR}/ElInfo3d.cc
	      ${SOURCE_DIR}/ElInfoStack.cc
	      ${SOURCE_DIR}/Element.cc
	      ${SOURCE_DIR}/ElementData.cc
	      ${SOURCE_DIR}/ElementDofIterator.cc
	      ${SOURCE_DIR}/Estimator.cc
	      ${SOURCE_DIR}/FiniteElemSpace.cc
	      ${SOURCE_DIR}/FirstOrderAssembler.cc
	      ${SOURCE_DIR}/FirstOrderTerm.cc
	      ${SOURCE_DIR}/FixVec.cc
	      ${SOURCE_DIR}/Global.cc
	      ${SOURCE_DIR}/GlobalDOFNumbering.cc
	      ${SOURCE_DIR}/GlobalElementNumbering.cc
	      ${SOURCE_DIR}/Lagrange.cc
	      ${SOURCE_DIR}/LeafData.cc
	      ${SOURCE_DIR}/Line.cc
	      ${SOURCE_DIR}/MacroElement.cc
	      ${SOURCE_DIR}/Marker.cc
	      ${SOURCE_DIR}/Mesh.cc
	      ${SOURCE_DIR}/MeshStructure.cc
	      ${SOURCE_DIR}/Operator.cc
	      ${SOURCE_DIR}/OperatorTerm.cc
	      ${SOURCE_DIR}/Parameters.cc
	      ${SOURCE_DIR}/Parametric.cc
	      ${SOURCE_DIR}/PeriodicBC.cc
	      ${SOURCE_DIR}/ProblemImplicit.cc
	      ${SOURCE_DIR}/ProblemInstat.cc
102 103 104
	      ${SOURCE_DIR}/ProblemInterpol.cc
	      ${SOURCE_DIR}/ProblemStat.cc
	      ${SOURCE_DIR}/ProblemStatDbg.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
	      ${SOURCE_DIR}/Projection.cc
	      ${SOURCE_DIR}/QPInfo.cc
	      ${SOURCE_DIR}/QPsiPhi.cc
	      ${SOURCE_DIR}/Quadrature.cc
	      ${SOURCE_DIR}/RCNeighbourList.cc
	      ${SOURCE_DIR}/Recovery.cc
	      ${SOURCE_DIR}/RecoveryEstimator.cc
	      ${SOURCE_DIR}/RefinementManager.cc
	      ${SOURCE_DIR}/RefinementManager1d.cc
	      ${SOURCE_DIR}/RefinementManager2d.cc
	      ${SOURCE_DIR}/RefinementManager3d.cc
	      ${SOURCE_DIR}/ResidualEstimator.cc
	      ${SOURCE_DIR}/RobinBC.cc
	      ${SOURCE_DIR}/ScalableQuadrature.cc
	      ${SOURCE_DIR}/SecondOrderAssembler.cc
	      ${SOURCE_DIR}/SecondOrderTerm.cc
121
	      ${SOURCE_DIR}/Serializer.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
122 123 124 125 126 127 128 129 130 131 132
	      ${SOURCE_DIR}/StandardProblemIteration.cc
	      ${SOURCE_DIR}/SubAssembler.cc
	      ${SOURCE_DIR}/SubElInfo.cc
	      ${SOURCE_DIR}/SubQuadrature.cc
	      ${SOURCE_DIR}/SurfaceQuadrature.cc
	      ${SOURCE_DIR}/Tetrahedron.cc
	      ${SOURCE_DIR}/Traverse.cc
	      ${SOURCE_DIR}/Triangle.cc
	      ${SOURCE_DIR}/VertexVector.cc
	      ${SOURCE_DIR}/ZeroOrderAssembler.cc
	      ${SOURCE_DIR}/ZeroOrderTerm.cc
133 134
	      ${SOURCE_DIR}/io/ArhReader.cc
	      ${SOURCE_DIR}/io/ArhWriter.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
	      ${SOURCE_DIR}/io/DataCollector.cc
	      ${SOURCE_DIR}/io/DofWriter.cc
	      ${SOURCE_DIR}/io/ElementFileWriter.cc
	      ${SOURCE_DIR}/io/FileWriter.cc
	      ${SOURCE_DIR}/io/GNUPlotWriter.cc
	      ${SOURCE_DIR}/io/MacroInfo.cc
	      ${SOURCE_DIR}/io/MacroReader.cc
	      ${SOURCE_DIR}/io/MacroWriter.cc
	      ${SOURCE_DIR}/io/PngWriter.cc
	      ${SOURCE_DIR}/io/PovrayWriter.cc
	      ${SOURCE_DIR}/io/ValueReader.cc
	      ${SOURCE_DIR}/io/ValueWriter.cc
	      ${SOURCE_DIR}/io/VtkWriter.cc
	      ${SOURCE_DIR}/parallel/InteriorBoundary.cc
	      ${SOURCE_DIR}/time/RosenbrockAdaptInstationary.cc
150
	      ${SOURCE_DIR}/time/RosenbrockMethod.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
151
	      ${SOURCE_DIR}/time/RosenbrockStationary.cc
Naumann, Andreas's avatar
Naumann, Andreas committed
152 153
	      )

154
if(ENABLE_PARALLEL_DOMAIN)
Naumann, Andreas's avatar
Naumann, Andreas committed
155
	find_package(MPI REQUIRED)
156 157 158 159 160 161 162
	if(MPI_FOUND)
	  #INCLUDE (CMakeForceCompiler)	
	  #CMAKE_FORCE_C_COMPILER(mpicc "MPI C compiler")
	  #CMAKE_FORCE_CXX_COMPILER(mpiCC "MPI C++ compiler")
	  list(APPEND AMDiS_COMPILEFLAGS ${MPI_COMPILE_FLAGS})
	  include_directories(${MPI_INCLUDE_PATH})
	endif(MPI_FOUND)
163 164 165 166 167
 
	add_custom_target(parmetis-lib ALL
			make
			WORKING_DIRECTORY ${LIB_DIR}/ParMetis-3.1
			)
Naumann, Andreas's avatar
Naumann, Andreas committed
168
	include_directories( ${LIB_DIR}/ParMetis-3.1)
169
        INSTALL(FILES ${LIB_DIR}/ParMetis-3.1/parmetis.h
170 171
		${LIB_DIR}/ParMetis-3.1/libparmetis.a
		${LIB_DIR}/ParMetis-3.1/libmetis.a
172
		DESTINATION lib/amdis/parmetis
173
	       )
174
	set(ENABLE_PARMETIS ON)
175 176 177 178
	if(ENABLE_ZOLTAN)
	  find_file(ZOLTAN_HEADER_FILE "zoltan_cpp.h")
	  if( ZOLTAN_HEADER_FILE )
		get_filename_component(ZOLTAN_HEADER_DIR "${ZOLTAN_HEADER_FILE}" PATH CACHE)
179
		include_directories(${ZOLTAN_HEADER_DIR})
180
	  else()
181
		message( FATAL_ERROR "could not find zoltan.")
182 183 184 185
	  endif( ZOLTAN_HEADER_FILE )
	  set(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_ZOLTAN")
	endif(ENABLE_ZOLTAN)

186
	set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake-2.8/Modules/;${CMAKE_SOURCE_DIR}/")
187
	set(PETSC_EXECUTABLE_RUNS ON)
188
	find_package(PETSc REQUIRED)
Naumann, Andreas's avatar
Naumann, Andreas committed
189 190
	include_directories(${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include)
	SET(PARALLEL_DOMAIN_AMDIS_SRC
191
		${SOURCE_DIR}/parallel/CheckerPartitioner.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
192
		${SOURCE_DIR}/parallel/ElementObjectData.cc
193
		${SOURCE_DIR}/parallel/MeshDistributor.cc 
194
		${SOURCE_DIR}/parallel/MeshManipulation.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
195
		${SOURCE_DIR}/parallel/MeshPartitioner.cc
196
		${SOURCE_DIR}/parallel/MpiHelper.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
197
		${SOURCE_DIR}/parallel/ParallelDebug.cc
198
		${SOURCE_DIR}/parallel/ParallelProblemStatBase.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
199
                ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc
200
		${SOURCE_DIR}/parallel/PetscProblemStat.cc
201
		${SOURCE_DIR}/parallel/PetscSolver.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
202 203
		${SOURCE_DIR}/parallel/PetscSolverGlobalMatrix.cc
		${SOURCE_DIR}/parallel/PetscSolverSchur.cc
Thomas Witkowski's avatar
Thomas Witkowski committed
204
		${SOURCE_DIR}/parallel/StdMpi.cc
205
		${SOURCE_DIR}/parallel/ZoltanPartitioner.cc)
Naumann, Andreas's avatar
Naumann, Andreas committed
206
	SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_DOMAIN_AMDIS=1")
207 208
	INSTALL(FILES ResolveCompilerPaths.cmake FindPackageMultipass.cmake FindPETSc.cmake
		DESTINATION share/amdis/)
Naumann, Andreas's avatar
Naumann, Andreas committed
209 210 211
	if( USE_PETSC_DEV )
	  SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PETSC_DEV")
	endif( USE_PETSC_DEV)
Naumann, Andreas's avatar
Naumann, Andreas committed
212 213 214 215 216
endif(ENABLE_PARALLEL_DOMAIN)

if(ENABLE_UMFPACK)
	include_directories(${LIB_DIR}/UFconfig ${LIB_DIR}/AMD/Include ${LIB_DIR}/UMFPACK/Include)
	SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_UMFPACK=1 -DMTL_HAS_UMFPACK")
217
        FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/UMFPACK/Include/*.h")
218 219
	INSTALL(FILES ${UMFPACK_HEADERS} 
		DESTINATION include/amdis/umfpack/)
220
	list(APPEND deb_add_dirs "include/amdis/umfpack")
221

222
	FILE(GLOB UMFPACK_HEADERS "${LIB_DIR}/AMD/Include/*.h")
223 224
	INSTALL(FILES ${UMFPACK_HEADERS} 
		DESTINATION include/amdis/amd/)
225
	list(APPEND deb_add_dirs "include/amdis/amd")
226

227
	FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/*.h")
228 229
	INSTALL(FILES ${HEADERS} 
		DESTINATION include/amdis/ufconfig/)
230
	list(APPEND deb_add_dirs "include/amdis/ufconfig")
231

232
	FILE(GLOB HEADERS "${LIB_DIR}/UFconfig/xerbla/*.h")
233 234
	INSTALL(FILES ${HEADERS} 
		DESTINATION include/amdis/ufconfig/xerbla)
235
	list(APPEND deb_add_dirs "include/amdis/ufconfig/xerbla")
236

237 238 239 240 241 242 243 244 245 246 247 248
#add some rules to build the umfpack and amd libs
#	message("adding command for libumfpack:${CMAKE_CURRENT_SOURCE_DIR}/${LIB_DIR}/UMFPACK/Lib/libumfpack.a ")
	add_custom_target(umfpack-lib ALL
			make
			WORKING_DIRECTORY ${LIB_DIR}/UMFPACK
			)

	add_custom_target(amd-lib ALL
			 make
			WORKING_DIRECTORY ${LIB_DIR}/AMD
			)

249 250
	INSTALL(FILES ${LIB_DIR}/UMFPACK/Lib/libumfpack.a 
		DESTINATION lib/amdis/umfpack/)
251
	list(APPEND deb_add_dirs "lib/amdis/umfpack")
252 253
	INSTALL(FILES ${LIB_DIR}/AMD/Lib/libamd.a 
		DESTINATION lib/amdis/amd/)
254 255
	list(APPEND deb_add_dirs "lib/amdis/amd")

256
	SET(RPM_DEPEND_STR "blas")
257
	LIST(APPEND AMDiS_LIBS amdis blas amd umfpack)
Naumann, Andreas's avatar
Naumann, Andreas committed
258 259
endif(ENABLE_UMFPACK)

260
SET(COMPOSITE_SOURCE_DIR ${SOURCE_DIR}/compositeFEM)
Thomas Witkowski's avatar
Thomas Witkowski committed
261 262 263 264 265 266 267 268
SET(COMPOSITE_FEM_SRC ${COMPOSITE_SOURCE_DIR}/CFE_Integration.cc 
		      ${COMPOSITE_SOURCE_DIR}/CFE_NormAndErrorFcts.cc 
		      ${COMPOSITE_SOURCE_DIR}/CompositeFEMMethods.cc 
		      ${COMPOSITE_SOURCE_DIR}/CompositeFEMOperator.cc 
		      ${COMPOSITE_SOURCE_DIR}/LevelSetAdaptMesh.cc 
		      ${COMPOSITE_SOURCE_DIR}/PenaltyOperator.cc 
		      ${COMPOSITE_SOURCE_DIR}/ElementLevelSet.cc 
		      ${COMPOSITE_SOURCE_DIR}/SubPolytope.cc 
Naumann, Andreas's avatar
Naumann, Andreas committed
269 270
		      ${COMPOSITE_SOURCE_DIR}/SubElementAssembler.cc )

271 272 273 274
set(REINIT_SOURCE_DIR ${SOURCE_DIR}/reinit)
file(GLOB REINIT_SRC ${REINIT_SOURCE_DIR}/*.cc)
include_directories(${REINIT_SOURCE_DIR})

Naumann, Andreas's avatar
Naumann, Andreas committed
275
#mtl4 includes
276
include_directories(${MTL_DIR})
Naumann, Andreas's avatar
Naumann, Andreas committed
277 278
include_directories(${SOURCE_DIR})

279
add_library(amdis SHARED ${AMDIS_SRC} ${PARALLEL_DOMAIN_AMDIS_SRC})
Naumann, Andreas's avatar
Naumann, Andreas committed
280
add_library(compositeFEM SHARED ${COMPOSITE_FEM_SRC})
281
add_library(reinit STATIC ${REINIT_SRC})
282
target_link_libraries(compositeFEM amdis)
283
LIST(APPEND AMDiS_LIBS amdis boost_system boost_iostreams)
284

285 286 287
if(WIN32)
	SET(COMPILEFLAGS "${COMPILEFLAGS} -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS")
endif(WIN32)
288
message("compileflags: ${COMPILEFLAGS}")
289 290
#SET_TARGET_PROPERTIES(amdis PROPERTIES COMPILE_FLAGS "${COMPILEFLAGS}")
add_definitions(${COMPILEFLAGS})
Naumann, Andreas's avatar
Naumann, Andreas committed
291 292 293 294
if(ENABLE_MARMOT)
	Message("please set marmotcc manually")
endif(ENABLE_MARMOT)

295
#dont change this destination. the GUI depends on it to guess the buildsystem
296
list(APPEND deb_add_dirs "lib/amdis")
Naumann, Andreas's avatar
Naumann, Andreas committed
297
install(TARGETS amdis compositeFEM 
298
	LIBRARY DESTINATION lib/amdis/ )
299

300
FILE(GLOB HEADERS "${SOURCE_DIR}/*.h")
301 302
INSTALL(FILES ${HEADERS} 
	DESTINATION include/amdis/)
Naumann, Andreas's avatar
Naumann, Andreas committed
303 304
list(APPEND deb_add_dirs "include/amdis")

305
FILE(GLOB HEADERS "${SOURCE_DIR}/*.hh")
306 307
INSTALL(FILES ${HEADERS} 
	DESTINATION include/amdis/)
Naumann, Andreas's avatar
Naumann, Andreas committed
308

309
FILE(GLOB HEADERS "${SOURCE_DIR}/parallel/*.h")
310 311
INSTALL(FILES ${HEADERS} 
	DESTINATION include/amdis/parallel/)
Naumann, Andreas's avatar
Naumann, Andreas committed
312 313
list(APPEND deb_add_dirs "include/amdis/parallel")

314
FILE(GLOB HEADERS "${SOURCE_DIR}/time/*.h")
315 316
INSTALL(FILES ${HEADERS} 
	DESTINATION include/amdis/time/)
Naumann, Andreas's avatar
Naumann, Andreas committed
317 318
list(APPEND deb_add_dirs "include/amdis/time")

319
FILE(GLOB HEADERS "${SOURCE_DIR}/itl/*.hpp")
320 321
INSTALL(FILES ${HEADERS} 
	DESTINATION include/amdis/itl)
Naumann, Andreas's avatar
Naumann, Andreas committed
322 323
list(APPEND deb_add_dirs "include/amdis/itl")

324
FILE(GLOB HEADERS "${SOURCE_DIR}/io/*.h")
Naumann, Andreas's avatar
Naumann, Andreas committed
325 326
INSTALL(FILES ${HEADERS}
	DESTINATION include/amdis/io)
Naumann, Andreas's avatar
Naumann, Andreas committed
327 328
list(APPEND deb_add_dirs "include/amdis/io")

329
FILE(GLOB HEADERS "${SOURCE_DIR}/io/*.hh")
Naumann, Andreas's avatar
Naumann, Andreas committed
330 331
INSTALL(FILES ${HEADERS}
	DESTINATION include/amdis/io)
332

333
configure_file(${AMDiS_SOURCE_DIR}/AMDiSConfig.cmake.in
334
		${AMDiS_BINARY_DIR}/AMDISConfig.cmake
335 336
		@ONLY
	      )
337

338
INSTALL(FILES ${AMDiS_BINARY_DIR}/AMDISConfig.cmake 
339
	DESTINATION share/amdis/)
Naumann, Andreas's avatar
Naumann, Andreas committed
340 341
list(APPEND deb_add_dirs "share/amdis/")

342
INSTALL(FILES ${AMDiS_SOURCE_DIR}/AMDiSUse.cmake 
343
	DESTINATION share/amdis/)
Naumann, Andreas's avatar
Naumann, Andreas committed
344

345
#install mtl
346
INSTALL(DIRECTORY ${AMDiS_SOURCE_DIR}/lib/mtl4/
347 348 349 350 351 352
	DESTINATION include/amdis/mtl4/
	FILES_MATCHING PATTERN "*.hpp"
	PATTERN ".svn" EXCLUDE
	PATTERN ".svn/*" EXCLUDE
	PATTERN "mtl4/libs" EXCLUDE
	PATTERN "mtl4/extern" EXCLUDE
353
       )
Naumann, Andreas's avatar
Naumann, Andreas committed
354 355 356 357 358
FILE(GLOB_RECURSE mtl4_files 
		RELATIVE ${AMDiS_SOURCE_DIR}/lib/mtl4/boost/ 
		${AMDiS_SOURCE_DIR}/lib/mtl4/boost/*.hpp)
foreach(mtl4_file in ${mtl4_files})
 get_filename_component(mtl4File_path ${mtl4_file} PATH)
359
 list(APPEND deb_add_dirs "include/amdis/mtl4/boost/${mtl4File_path}")
Naumann, Andreas's avatar
Naumann, Andreas committed
360 361
endforeach(mtl4_file)
list(REMOVE_DUPLICATES deb_add_dirs)
362 363

#PACKAGES
364 365 366
#let cmake look for the svn-version
find_package(Subversion)
if(Subversion_FOUND)
367
	Subversion_WC_INFO(${AMDiS_SOURCE_DIR} mtlSubinfo)
368 369 370 371 372
	set(CurrentRevision ${mtlSubinfo_WC_REVISION})
#       message("current revision: ${mtlSubinfo_WC_REVISION}")
else(Subversion_FOUND)
	set(CurrentRevision "0")
endif(Subversion_FOUND)
Naumann, Andreas's avatar
Naumann, Andreas committed
373
set(CPACK_PACKAGE_NAME "AMDiS")
374
set(CPACK_PACKAGE_CONTACT "Andreas.Naumann@tu-dresden.de")
375
set(CPACK_PACKAGE_VERSION "0.9.${CurrentRevision}")
376 377 378
set(CPACK_GENERATOR "RPM" "DEB" "TGZ")
set(CPACK_INSTALL_PREFIX "/usr/")

Naumann, Andreas's avatar
Naumann, Andreas committed
379 380 381 382 383 384 385
configure_file(${AMDiS_SOURCE_DIR}/preinst.in 
  ${AMDiS_BINARY_DIR}/preinst 
  @ONLY)

configure_file(${AMDiS_SOURCE_DIR}/postrm.in 
  ${AMDiS_BINARY_DIR}/postrm 
  @ONLY)
386
set(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= 1.42, ${RPM_DEPEND_STR}")
Naumann, Andreas's avatar
Naumann, Andreas committed
387
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-dev (>= 1.42), libboost-iostreams-dev (>= 1.42), libboost-system-dev (>= 1.42)")
Naumann, Andreas's avatar
Naumann, Andreas committed
388 389
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${AMDiS_BINARY_DIR}/preinst" "${AMDiS_BINARY_DIR}/postrm")

390
include(CPack)
Naumann, Andreas's avatar
Naumann, Andreas committed
391
if(ENABLE_TESTS)
392 393
ENABLE_TESTING()
add_subdirectory(test)
Naumann, Andreas's avatar
Naumann, Andreas committed
394
endif(ENABLE_TESTS)