Skip to content

Commit

Permalink
CMake and TravisCI for ParMGridGen.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris authored and Chris committed Jun 9, 2015
1 parent 693bd2a commit 9e8f715
Show file tree
Hide file tree
Showing 8 changed files with 213 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: c

compiler:
- gcc
- clang

sudo: false

cache:
directories:
- $HOME/.ccache

addons:
apt:
packages:
- libopenmpi-dev

before_script:
- export PATH=/usr/lib/ccache:$PATH

script:
- cmake . && make

matrix:
allow_failures:
- compiler: clang
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 2.8)

project(ParMGridGen)

add_subdirectory(MGridGen/IMlib)
add_subdirectory(MGridGen/Lib)
add_subdirectory(MGridGen/Programs)

add_subdirectory(ParMGridGen/IMParMetis-2.0)
add_subdirectory(ParMGridGen/ParLib)
add_subdirectory(ParMGridGen/Programs)
17 changes: 17 additions & 0 deletions MGridGen/IMlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
set(SOURCES
blas.c
dfkeysort.c
dkeysort.c
file.c
ifkeysort.c
ifloatsort.c
iintsort.c
ikeysort.c
memory.c
sort.c
util.c
)

add_library(IMlib ${SOURCES})

install(TARGETS IMlib DESTINATION lib)
31 changes: 31 additions & 0 deletions MGridGen/Lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
set(SOURCES
coarsen.c
kwayfm.c
match.c
merge.c
mgridgen.c
refine.c
setup.c
../IMlib/blas.c
../IMlib/dfkeysort.c
../IMlib/dkeysort.c
../IMlib/file.c
../IMlib/ifkeysort.c
../IMlib/ifloatsort.c
../IMlib/iintsort.c
../IMlib/ikeysort.c
../IMlib/memory.c
../IMlib/sort.c
../IMlib/util.c
)

set(LIBRARIES
m
)

include_directories(../IMlib)

add_library(mgrid ${SOURCES})
target_link_libraries(mgrid ${LIBRARIES})

install(TARGETS mgrid DESTINATION lib)
16 changes: 16 additions & 0 deletions MGridGen/Programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
set(SOURCES
io.c
mgridgen.c
)

set(LIBRARIES
mgrid
)

include_directories(../IMlib)
include_directories(../Lib)

add_executable(mgridgen ${SOURCES})
target_link_libraries(mgridgen ${LIBRARIES})

install(TARGETS mgridgen DESTINATION bin)
37 changes: 37 additions & 0 deletions ParMGridGen/IMParMetis-2.0/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
find_package(MPI)

if(MPI_C_FOUND)

set(SOURCES
ParMETISLib/fused.c
ParMETISLib/comm.c
ParMETISLib/util.c
ParMETISLib/memory.c
ParMETISLib/debug.c
ParMETISLib/setup.c
ParMETISLib/diffuse.c
ParMETISLib/grsetup.c
ParMETISLib/timer.c
ParMETISLib/coarsen.c
ParMETISLib/edge_refine.c
ParMETISLib/drivers.c
ParMETISLib/remap.c
ParMETISLib/iidxsort.c
ParMETISLib/ikeysort.c
ParMETISLib/var.c
)

set(LIBRARIES
${MPI_C_LIBRARIES}
)

add_definitions(${MPI_C_COMPILE_FLAGS})

include_directories(${MPI_C_INCLUDE_PATH})

add_library(IMparmetis ${SOURCES})
target_link_libraries(IMparmetis ${LIBRARIES})

install(TARGETS IMparmetis DESTINATION lib)

endif()
48 changes: 48 additions & 0 deletions ParMGridGen/ParLib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
find_package(MPI)

if(MPI_C_FOUND)

set(SOURCES
comm.c
util.c
memory.c
debug.c
setup.c
parmgridgen.c
grsetup.c
move.c
ikeysort.c
../IMParMetis-2.0/ParMETISLib/fused.c
../IMParMetis-2.0/ParMETISLib/comm.c
../IMParMetis-2.0/ParMETISLib/util.c
../IMParMetis-2.0/ParMETISLib/memory.c
../IMParMetis-2.0/ParMETISLib/debug.c
../IMParMetis-2.0/ParMETISLib/setup.c
../IMParMetis-2.0/ParMETISLib/diffuse.c
../IMParMetis-2.0/ParMETISLib/grsetup.c
../IMParMetis-2.0/ParMETISLib/timer.c
../IMParMetis-2.0/ParMETISLib/coarsen.c
../IMParMetis-2.0/ParMETISLib/edge_refine.c
../IMParMetis-2.0/ParMETISLib/drivers.c
../IMParMetis-2.0/ParMETISLib/remap.c
../IMParMetis-2.0/ParMETISLib/iidxsort.c
../IMParMetis-2.0/ParMETISLib/ikeysort.c
../IMParMetis-2.0/ParMETISLib/var.c
)

set(LIBRARIES
${MPI_C_LIBRARIES}
mgrid
)

add_definitions(${MPI_C_COMPILE_FLAGS})

include_directories(${MPI_C_INCLUDE_PATH})
include_directories(../../MGridGen/IMlib)

add_library(parmgrid ${SOURCES})
target_link_libraries(parmgrid ${LIBRARIES})

install(TARGETS parmgrid DESTINATION lib)

endif()
27 changes: 27 additions & 0 deletions ParMGridGen/Programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
find_package(MPI)

if(MPI_C_FOUND)

set(SOURCES
io.c
main.c
parmgridgen.c
)

set(LIBRARIES
${MPI_C_LIBRARIES}
mpi
mgrid
parmgrid
)

include_directories(${MPI_C_INCLUDE_PATH})
include_directories(../../MGridGen/IMlib)
include_directories(../ParLib)

add_executable(parmgridgen ${SOURCES})
target_link_libraries(parmgridgen ${LIBRARIES})

install(TARGETS parmgridgen DESTINATION bin)

endif()

0 comments on commit 9e8f715

Please sign in to comment.