blob: ab9c18fb1d54c52ecb3f5ee61fffad8767721c83 [file] [log] [blame]
Narayan Kamathc981c482012-11-02 10:59:05 +00001#!/bin/bash
2
3if [[ $# != 1 || $1 == *help ]]
4then
Miao Wang2b8756b2017-03-06 13:45:08 -08005 echo "usage: $0 regexp"
Narayan Kamathc981c482012-11-02 10:59:05 +00006 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
10fi
11
12TESTSLIST="@EIGEN_TESTS_LIST@"
Yi Kong2aab7942022-02-25 16:32:14 +080013targets_to_make=$(echo "$TESTSLIST" | grep -E "$1" | xargs echo)
Narayan Kamathc981c482012-11-02 10:59:05 +000014
15if [ -n "${EIGEN_MAKE_ARGS:+x}" ]
16then
Miao Wang2b8756b2017-03-06 13:45:08 -080017 @CMAKE_MAKE_PROGRAM@ $targets_to_make ${EIGEN_MAKE_ARGS}
Narayan Kamathc981c482012-11-02 10:59:05 +000018else
Miao Wang2b8756b2017-03-06 13:45:08 -080019 @CMAKE_MAKE_PROGRAM@ $targets_to_make @EIGEN_TEST_BUILD_FLAGS@
Narayan Kamathc981c482012-11-02 10:59:05 +000020fi
21exit $?
22