2010-08-11 04:55:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# I don't like this setup. Ideas welcome.
|
2010-08-12 04:44:59 +00:00
|
|
|
#
|
|
|
|
# This script creates a build directory as a peer of cmaked2,
|
|
|
|
# and builds the tests there.
|
|
|
|
#
|
2013-10-16 15:31:54 +00:00
|
|
|
CMAKE_DIR=`pwd`/../cmake-d
|
|
|
|
TEST_DIR=../../cmake-d-test-build
|
|
|
|
rm -rf $TEST_DIR
|
|
|
|
mkdir -p $TEST_DIR
|
|
|
|
cd $TEST_DIR
|
2016-08-06 16:21:07 +00:00
|
|
|
|
|
|
|
# Do a unspecified build
|
|
|
|
mkdir -p unspecified
|
|
|
|
pushd unspecified
|
2013-10-16 15:31:54 +00:00
|
|
|
cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR ../../cmake-d/tests
|
2010-08-11 04:55:30 +00:00
|
|
|
make
|
|
|
|
make test
|
2016-08-06 16:21:07 +00:00
|
|
|
popd
|
2010-08-11 04:55:30 +00:00
|
|
|
|
|
|
|
# Do a debug build
|
|
|
|
mkdir -p debug
|
2016-08-06 16:21:07 +00:00
|
|
|
pushd debug
|
|
|
|
cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=Debug ../../cmake-d/tests
|
|
|
|
make
|
|
|
|
make test
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Do a release build
|
|
|
|
mkdir -p release
|
|
|
|
pushd release
|
|
|
|
cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=Release ../../cmake-d/tests
|
|
|
|
make
|
|
|
|
make test
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Do a relWithDebInfo build
|
|
|
|
mkdir -p relWithDebInfo
|
|
|
|
pushd relWithDebInfo
|
|
|
|
cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=RelWithDebInfo ../../cmake-d/tests
|
|
|
|
make
|
|
|
|
make test
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Do a minSizeRel build
|
|
|
|
mkdir -p minSizeRel
|
|
|
|
pushd minSizeRel
|
|
|
|
cmake -DCMAKE_MODULE_PATH:PATH=$CMAKE_DIR -DCMAKE_BUILD_TYPE=MinSizeRel ../../cmake-d/tests
|
2010-08-11 04:55:30 +00:00
|
|
|
make
|
|
|
|
make test
|
2016-08-06 16:21:07 +00:00
|
|
|
popd
|