Fix #923 - support CMAKE_CROSSCOMPILING_EMULATOR for tests

Replaced legacy syntax of cmake add_test() with more modern syntax.
This allows running gtests's own tests on remote (cross) systems
using CMAKE_CROSSCOMPILING_EMULATOR with cmake-3.3 or newer.
This commit is contained in:
Martin Oberhuber 2016-11-05 09:25:59 +01:00 committed by GitHub
parent a2b8a8e076
commit 008e54c1dd

View File

@ -216,7 +216,7 @@ find_package(PythonInterp)
# from the given source files with the given compiler flags.
function(cxx_test_with_flags name cxx_flags libs)
cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
add_test(${name} ${name})
add_test(NAME ${name} COMMAND ${name})
endfunction()
# cxx_test(name libs srcs...)