From 358452bbe6a3fcc8290969dbd531e30701a4c1f2 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 12 Nov 2009 12:07:18 -0500 Subject: * add ./debug and ./release scripts * update the messages * rename EIGEN_CMAKE_RUN_FROM_CTEST to something saner --- scripts/CMakeLists.txt | 4 ++++ scripts/debug.in | 3 +++ scripts/maketests.in | 21 +++++++++++++++++++++ scripts/mctestr.in | 14 ++++++++++++++ scripts/release.in | 3 +++ 5 files changed, 45 insertions(+) create mode 100644 scripts/CMakeLists.txt create mode 100755 scripts/debug.in create mode 100755 scripts/maketests.in create mode 100755 scripts/mctestr.in create mode 100755 scripts/release.in (limited to 'scripts') diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt new file mode 100644 index 000000000..e373d3188 --- /dev/null +++ b/scripts/CMakeLists.txt @@ -0,0 +1,4 @@ +configure_file(maketests.in ${CMAKE_BINARY_DIR}/maketests) +configure_file(mctestr.in ${CMAKE_BINARY_DIR}/mctestr) +configure_file(debug.in ${CMAKE_BINARY_DIR}/debug) +configure_file(release.in ${CMAKE_BINARY_DIR}/release) diff --git a/scripts/debug.in b/scripts/debug.in new file mode 100755 index 000000000..d339d3d1f --- /dev/null +++ b/scripts/debug.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cmake -DCMAKE_BUILD_TYPE=Debug . diff --git a/scripts/maketests.in b/scripts/maketests.in new file mode 100755 index 000000000..f9cafed26 --- /dev/null +++ b/scripts/maketests.in @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ $# == 0 -o $# -ge 3 ] +then + echo "usage: ./maketests regexp [jobs]" + echo " makes tests matching the regexp, with concurrent make jobs" + exit 0 +fi + +TESTSLIST="${cmake_tests_list}" +targets_to_make=`echo "$TESTSLIST" | grep "$1" | sed s/^/test_/g | xargs` + +if [ $# == 1 ] +then + make $targets_to_make +fi + +if [ $# == 2 ] +then + make -j $2 $targets_to_make +fi diff --git a/scripts/mctestr.in b/scripts/mctestr.in new file mode 100755 index 000000000..a388ef38f --- /dev/null +++ b/scripts/mctestr.in @@ -0,0 +1,14 @@ +#!/bin/bash +# mctestr : shorthand for make and ctest -R + +if [ $# == 0 -o $# -ge 3 ] +then + echo "usage: ./mctestr regexp [jobs]" + echo " makes and runs tests matching the regexp, with concurrent make jobs" + exit 0 +fi + +./maketests $* + +# TODO when ctest 2.8 comes out, honor the jobs parameter +ctest -R $1 \ No newline at end of file diff --git a/scripts/release.in b/scripts/release.in new file mode 100755 index 000000000..db2d9d940 --- /dev/null +++ b/scripts/release.in @@ -0,0 +1,3 @@ +#!/bin/sh + +cmake -DCMAKE_BUILD_TYPE=Release . -- cgit v1.2.3