Narayan Kamath | c981c48 | 2012-11-02 10:59:05 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [[ $# != 1 || $1 == *help ]] |
| 4 | then |
Miao Wang | 2b8756b | 2017-03-06 13:45:08 -0800 | [diff] [blame] | 5 | echo "usage: $0 regexp" |
Narayan Kamath | c981c48 | 2012-11-02 10:59:05 +0000 | [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@" |
Yi Kong | 2aab794 | 2022-02-25 16:32:14 +0800 | [diff] [blame] | 13 | targets_to_make=$(echo "$TESTSLIST" | grep -E "$1" | xargs echo) |
Narayan Kamath | c981c48 | 2012-11-02 10:59:05 +0000 | [diff] [blame] | 14 | |
| 15 | if [ -n "${EIGEN_MAKE_ARGS:+x}" ] |
| 16 | then |
Miao Wang | 2b8756b | 2017-03-06 13:45:08 -0800 | [diff] [blame] | 17 | @CMAKE_MAKE_PROGRAM@ $targets_to_make ${EIGEN_MAKE_ARGS} |
Narayan Kamath | c981c48 | 2012-11-02 10:59:05 +0000 | [diff] [blame] | 18 | else |
Miao Wang | 2b8756b | 2017-03-06 13:45:08 -0800 | [diff] [blame] | 19 | @CMAKE_MAKE_PROGRAM@ $targets_to_make @EIGEN_TEST_BUILD_FLAGS@ |
Narayan Kamath | c981c48 | 2012-11-02 10:59:05 +0000 | [diff] [blame] | 20 | fi |
| 21 | exit $? |
| 22 | |