aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-12 12:07:18 -0500
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2009-11-12 12:07:18 -0500
commit358452bbe6a3fcc8290969dbd531e30701a4c1f2 (patch)
treee6381db65f5583ad0ac680da66aff5ac749df0cf /scripts
parentfc492b6264249e8ec5b7234d8d53047c49fcb710 (diff)
* add ./debug and ./release scripts
* update the messages * rename EIGEN_CMAKE_RUN_FROM_CTEST to something saner
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt4
-rwxr-xr-xscripts/debug.in3
-rwxr-xr-xscripts/maketests.in21
-rwxr-xr-xscripts/mctestr.in14
-rwxr-xr-xscripts/release.in3
5 files changed, 45 insertions, 0 deletions
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 <jobs> 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 <jobs> 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 .