Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Commit c6a7984

Browse files
author
David Blom
authored
Refactoring build process (#336)
Do not remove the previous build of elemental in order to speedup recompilation times Use the compilation script of precice during the wercker build
1 parent 97a4131 commit c6a7984

File tree

3 files changed

+9
-44
lines changed

3 files changed

+9
-44
lines changed

src/thirdParty/compile_elemental

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
22

3+
set -e
4+
set -x
5+
36
cd elemental
4-
rm -rf build install
5-
mkdir build install && cd build
7+
mkdir -p build install && cd build
68

79
if [ "$WM_COMPILE_OPTION" = "Opt" ]
810
then

src/thirdParty/compile_precice

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ export PETSC_ARCH=x86_64
3535
cd precice
3636
if [ "$WM_COMPILE_OPTION" = "Opt" ]
3737
then
38-
scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx
38+
scons -j $WM_NCOMPPROCS build=release python=off petsc=on compiler=mpicxx solib Symlink
3939
elif [ "$WM_COMPILE_OPTION" = "Debug" ]
4040
then
41-
scons -j $WM_NCOMPPROCS build=debug python=off petsc=on compiler=mpicxx
41+
scons -j $WM_NCOMPPROCS build=debug python=off petsc=on compiler=mpicxx solib Symlink
4242
fi
4343

4444
cp build/last/libprecice.* ${FOAM_LIBBIN}/
45-
cp build/last/binprecice ${FOAM_APPBIN}/

wercker.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,7 @@ build:
4646
name: precice
4747
code: |
4848
(cd /home/foam-extend-3.2 && source etc/prefs.sh && source etc/bashrc)
49-
50-
cd src/thirdParty
51-
52-
export PRECICE_MPI_LIB=mpi
53-
export PRECICE_MPI_LIB_PATH="`mpicc --showme:libdirs`"
54-
export PRECICE_MPI_INC_PATH="`mpicc --showme:incdirs`"
55-
export CPLUS_INCLUDE_PATH=`pwd`/eigen:`pwd`/boost
56-
export LIBRARY_PATH=$FOAM_LIBBIN
57-
58-
cd precice
59-
scons -j $WM_NCOMPPROCS build=release python=off petsc=off compiler=mpicxx solib
60-
cp build/release-nopetsc-nopython/libprecice.* ${FOAM_LIBBIN}/
61-
rm -rf build/*
49+
cd src/thirdParty && ./compile_precice
6250
- script:
6351
name: boundary conditions
6452
code: |
@@ -184,19 +172,7 @@ debug:
184172
name: precice
185173
code: |
186174
(cd /home/foam-extend-3.2 && source etc/prefs.sh && source etc/bashrc)
187-
188-
cd src/thirdParty
189-
190-
export PRECICE_MPI_LIB=mpi
191-
export PRECICE_MPI_LIB_PATH="`mpicc --showme:libdirs`"
192-
export PRECICE_MPI_INC_PATH="`mpicc --showme:incdirs`"
193-
export CPLUS_INCLUDE_PATH=`pwd`/eigen:`pwd`/boost
194-
export LIBRARY_PATH=$FOAM_LIBBIN
195-
196-
cd precice
197-
scons -j $WM_NCOMPPROCS build=debug python=off petsc=off compiler=mpicxx solib
198-
cp build/debug-nopetsc-nopython/libprecice.* ${FOAM_LIBBIN}/
199-
rm -rf build/*
175+
cd src/thirdParty && ./compile_precice
200176
- script:
201177
name: boundary conditions
202178
code: |
@@ -286,19 +262,7 @@ ubuntu:
286262
name: precice
287263
code: |
288264
(cd /home/foam-extend-3.2 && source etc/prefs.sh && source etc/bashrc)
289-
290-
cd src/thirdParty
291-
292-
export PRECICE_MPI_LIB=mpi
293-
export PRECICE_MPI_LIB_PATH="`mpicc --showme:libdirs`"
294-
export PRECICE_MPI_INC_PATH="`mpicc --showme:incdirs`"
295-
export CPLUS_INCLUDE_PATH=`pwd`/eigen:`pwd`/boost
296-
export LIBRARY_PATH=$FOAM_LIBBIN
297-
298-
cd precice
299-
scons -j $WM_NCOMPPROCS build=release python=off petsc=off compiler=mpicxx solib
300-
cp build/release-nopetsc-nopython/libprecice.* ${FOAM_LIBBIN}/
301-
rm -rf build/*
265+
cd src/thirdParty && ./compile_precice
302266
- script:
303267
name: boundary conditions
304268
code: |

0 commit comments

Comments
 (0)