diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-11-03 17:37:25 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-11-03 17:37:25 +0100 |
commit | 05de3dddcae35c8b6ea8a596ef3726127e45f619 (patch) | |
tree | 9ca0acb77ce6beb64e3dc7f558726af130175e93 /cmake/EigenTesting.cmake | |
parent | 94d87abbdb4e484f2d7bce4bc285ce8fbdb81431 (diff) |
use runtest.sh script iif /bin/bash does exist
Diffstat (limited to 'cmake/EigenTesting.cmake')
-rw-r--r-- | cmake/EigenTesting.cmake | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/EigenTesting.cmake b/cmake/EigenTesting.cmake index 50a2b0f6a..476d0683c 100644 --- a/cmake/EigenTesting.cmake +++ b/cmake/EigenTesting.cmake @@ -3,6 +3,9 @@ option(EIGEN_DEBUG_ASSERTS "Enable advanced debuging of assertions" OFF) include(CheckCXXSourceCompiles) +# check whether /bin/bash exists +find_file(EIGEN_BIN_BASH_EXISTS "/bin/bash" PATHS "/" NO_DEFAULT_PATH) + macro(ei_add_property prop value) get_property(previous GLOBAL PROPERTY ${prop}) set_property(GLOBAL PROPERTY ${prop} "${previous} ${value}") @@ -61,15 +64,11 @@ macro(ei_add_test_internal testname testname_with_suffix) endif() endif() - if(WIN32) - if(CYGWIN) - add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}") - else(CYGWIN) - add_test(${testname_with_suffix} "${targetname}") - endif(CYGWIN) - else(WIN32) + if(EIGEN_BIN_BASH_EXISTS) add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}") - endif(WIN32) + else() + add_test(${testname_with_suffix} "${targetname}") + endif() endmacro(ei_add_test_internal) |