Commit 21bc6abe authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

added cmake-port of demos, can use cmake package

parent 9835dec9
project("amdis_demo")
cmake_minimum_required(VERSION 2.8)
#SET(AMDiS_DIR ../AMDiS)
#find_package(AMDiS REQUIRED COMPONENTS umfpack )
find_package(AMDiS REQUIRED)
if(AMDiS_FOUND)
message("amdis was found\n")
include(${AMDiS_USE_FILE})
SET(BASIS_LIBS ${AMDiS_LIBRARIES})
endif(AMDiS_FOUND)
option(USE_PARALLEL "check if the parallel demo are also used" false)
option(USE_OPENMP "check if amdis is compiled with openmp" false)
if(USE_PARALLEL)
#Message("look for mpi package")
find_package(MPI REQUIRED)
# if(NOT MPI_FOUND)
# Message(ERROR_FATAL "Mpi not found")
# endif(NOT MPI_FOUND)
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")
CMAKE_FORCE_C_COMPILER(mpicc "MPI C Compiler")
SET(PARALLEL_ELLIPT_SRC src/parallelellipt.cc)
SET(PARALLEL_HEAT_SRC src/parallelheat.cc)
add_executable(parallelellipt ${PARALLEL_ELLIPT_SRC})
add_executable(parallelheat ${PARALLEL_HEAT_SRC})
target_link_libraries(parallelellipt ${BASIS_LIBS})
target_link_libraries(parallelheat ${BASIS_LIBS})
endif(USE_PARALLEL)
SET(ELLIPT_SRC src/ellipt.cc)
SET(HEAT_SRC src/heat.cc)
SET(VECELLIPT_SRC src/vecellipt.cc)
SET(VECHEAT_SRC src/vecheat.cc)
SET(SPHERE_SRC src/sphere.cc)
SET(BALL_SRC src/ball.cc)
SET(PARAMETRIC_SRC src/parametric.cc)
SET(TORUS_SRC src/torus.cc)
SET(BUNNY_SRC src/bunny.cc)
SET(PERIODIC_SRC src/periodic.cc)
#SET(COUPLE_SRC src/couple.cc)
add_executable(ellipt ${ELLIPT_SRC})
add_executable(heat ${HEAT_SRC})
add_executable(vecellipt ${VECELLIPT_SRC})
add_executable(vecheat ${VECHEAT_SRC})
add_executable(sphere ${SPHERE_SRC})
add_executable(ball ${BALL_SRC})
add_executable(parametric ${PARAMETRIC_SRC})
add_executable(torus ${TORUS_SRC})
add_executable(bunny ${BUNNY_SRC})
add_executable(periodic ${PERIODIC_SRC})
#add_executable(couple ${COUPLE_SRC})
target_link_libraries(ellipt ${BASIS_LIBS})
target_link_libraries(heat ${BASIS_LIBS})
target_link_libraries(vecellipt ${BASIS_LIBS})
target_link_libraries(vecheat ${BASIS_LIBS})
target_link_libraries(sphere ${BASIS_LIBS})
target_link_libraries(ball ${BASIS_LIBS})
target_link_libraries(parametric ${BASIS_LIBS})
target_link_libraries(torus ${BASIS_LIBS})
target_link_libraries(bunny ${BASIS_LIBS})
target_link_libraries(periodic ${BASIS_LIBS})
#target_link_libraries(couple ${BASIS_LIBS})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment