Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [[ $# != 1 || $1 == *help ]] |
| 4 | then |
Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame] | 5 | echo "usage: $0 regexp" |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 6 | echo " Builds tests matching the regexp." |
| 7 | echo " The EIGEN_MAKE_ARGS environment variable allows to pass args to 'make'." |
| 8 | echo " For example, to launch 5 concurrent builds, use EIGEN_MAKE_ARGS='-j5'" |
| 9 | exit 0 |
| 10 | fi |
| 11 | |
| 12 | TESTSLIST="@EIGEN_TESTS_LIST@" |
Austin Schuh | c55b017 | 2022-02-20 17:52:35 -0800 | [diff] [blame] | 13 | targets_to_make=$(echo "$TESTSLIST" | grep -E "$1" | xargs echo) |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 14 | |
| 15 | if [ -n "${EIGEN_MAKE_ARGS:+x}" ] |
| 16 | then |
Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame] | 17 | @CMAKE_MAKE_PROGRAM@ $targets_to_make ${EIGEN_MAKE_ARGS} |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 18 | else |
Austin Schuh | 189376f | 2018-12-20 22:11:15 +1100 | [diff] [blame] | 19 | @CMAKE_MAKE_PROGRAM@ $targets_to_make @EIGEN_TEST_BUILD_FLAGS@ |
Brian Silverman | 72890c2 | 2015-09-19 14:37:37 -0400 | [diff] [blame] | 20 | fi |
| 21 | exit $? |
| 22 | |