Skip to content

Commit

Permalink
Update build/test instructions to work on OSX
Browse files Browse the repository at this point in the history
This was done as part of #126 but is not directly related to that story.
  • Loading branch information
bartlettroscoe committed Nov 3, 2016
1 parent 793de3d commit 2f2ac64
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 28 deletions.
18 changes: 16 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,27 @@ To set up to develop on TriBITS:
NOTES:

* If you don't have a working and compatible Fortran compiler, then pass
``-DTriBITS_ENABLE_Fortran=OFF`` into the ``do-configure`` script.
``-DTriBITS_ENABLE_Fortran=OFF`` into the ``do-configure`` script as::

$ ./do-configure -DTriBITS_ENABLE_Fortran=OFF

* On Mac OSX systems, one has to manually set the path the the TriBITS
project base dir TRIBITS_BASE_DIR such as with::

$ env TRIBITS_BASE_DIR=.. ./do-configure [other options]

* Use as many processes as you have with ``ctest`` (``-j12`` is just used as
an example).

* All of the tests should pass on your machine before beginning any
development work (if there are any failures, then please `report them`_).
development work. If there are any failures, then please `report them`_.
To help show the failures you are seeing, do::

$ ./do-configure -DCTEST_PARALLEL_LEVEL=12
$ make dashboard

and then provide the link to the CDash results in the TriBITS Issue when
you report them.

Any change (refactoring) of TriBITS (minimally) requires that the automated
test suite run with ``ctest`` pass 100%. To add new features (in most cases)
Expand Down
13 changes: 5 additions & 8 deletions dev_testing/generic/do-configure-mpi-debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ EXTRA_ARGS=$@
# the default path.
#
# This script must be symbolically linked in for it to find the path back to
# the local TriBITS repo.
# the local TriBITS repo. However, on Mac OSX, one must manually set
# TRIBITS_BASE_DIR in the env before calling this script.
#

if [ "$TRIBITS_BASE_DIR" == "" ] ; then
_ABS_FILE_PATH=`readlink -f $0`
_ABS_FILE_PATH=`readlink -f $0` || \
echo "ERROR: Must set TRIBITS_BASE_DIR in env to TriBITS base dir!"
_SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
fi

TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"

cmake \
-D CMAKE_BUILD_TYPE:STRING="DEBUG" \
-D TPL_ENABLE_MPI:BOOL=ON \
-D PYTHON_EXECUTABLE=/usr/bin/python2.6 \
-D TriBITS_ENABLE_Fortran:BOOL=ON \
-D TriBITS_ENABLE_TESTS:BOOL=ON \
-D TriBITS_ENABLE_CONFIGURE_TIMING:BOOL=ON \
$EXTRA_ARGS \
${TRIBITS_BASE_DIR_ABS}
${TRIBITS_BASE_DIR}

14 changes: 6 additions & 8 deletions dev_testing/generic/do-configure-serial-debug-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,25 @@ EXTRA_ARGS=$@
# default.
#
# This script must be symbolically linked in for it to find the path back to
# the local TriBITS repo.
# the local TriBITS repo. However, on Mac OSX, one must manually set
# TRIBITS_BASE_DIR in the env before calling this script.
#

if [ "$TRIBITS_BASE_DIR" == "" ] ; then
_ABS_FILE_PATH=`readlink -f $0`
_ABS_FILE_PATH=`readlink -f $0` || \
echo "ERROR: Must set TRIBITS_BASE_DIR in env to TriBITS base dir!"
_SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
fi

TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"

cmake \
-D CMAKE_BUILD_TYPE="DEBUG" \
-D CMAKE_BUILD_TYPE=DEBUG \
-D TPL_ENABLE_MPI=OFF \
-D CMAKE_C_COMPILER=gcc \
-D TriBITS_ENABLE_Fortran=ON \
-D TriBITS_ENABLE_TESTS=ON \
-D TriBITS_ENABLE_CONFIGURE_TIMING=ON \
$EXTRA_ARGS \
${TRIBITS_BASE_DIR_ABS}
${TRIBITS_BASE_DIR}

# NOTE: Above we must set CMAKE_C_COMPILER=gcc or CMake will find cc by
# default and then it will not find Fortran.
18 changes: 8 additions & 10 deletions dev_testing/generic/do-configure-serial-release-gcc
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,32 @@
EXTRA_ARGS=$@

#
# Configure script for a SERIAL DEBUG build with GCC compilers of the TriBITS
# project & package.
# Configure script for a SERIAL RELEASE build with GCC compilers of the
# TriBITS project & package.
#
# This script will work in any platform where the gcc compilers are found by
# default.
#
# This script must be symbolically linked in for it to find the path back to
# the local TriBITS repo.
# the local TriBITS repo. However, on Mac OSX, one must manually set
# TRIBITS_BASE_DIR in the env before calling this script.
#

if [ "$TRIBITS_BASE_DIR" == "" ] ; then
_ABS_FILE_PATH=`readlink -f $0`
_ABS_FILE_PATH=`readlink -f $0` || \
echo "ERROR: Must set TRIBITS_BASE_DIR in env to TriBITS base dir!"
_SCRIPT_DIR=`dirname $_ABS_FILE_PATH`
TRIBITS_BASE_DIR=$_SCRIPT_DIR/../..
fi

TRIBITS_BASE_DIR_ABS=$(readlink -f $TRIBITS_BASE_DIR)
echo "TRIBITS_BASE_DIR_ABS = $TRIBITS_BASE_DIR_ABS"

cmake \
-D CMAKE_BUILD_TYPE="DEBUG" \
-D CMAKE_BUILD_TYPE=RELEASE \
-D TPL_ENABLE_MPI=OFF \
-D CMAKE_C_COMPILER=gcc \
-D TriBITS_ENABLE_Fortran=ON \
-D TriBITS_ENABLE_TESTS=ON \
-D TriBITS_ENABLE_CONFIGURE_TIMING=ON \
$EXTRA_ARGS \
${TRIBITS_BASE_DIR_ABS}
${TRIBITS_BASE_DIR}

# NOTE: Above we must set CMAKE_C_COMPILER=gcc or CMake will find cc by
# default and then it will not find Fortran.

0 comments on commit 2f2ac64

Please sign in to comment.