Merge c798e39a4f96f5a985126cc3fab4738b6412cfc1 into e93da23920

Closes #1836

PiperOrigin-RevId: 215461025
This commit is contained in:
Matthieu
2018-10-02 17:40:37 -04:00
committed by Gennadiy Civil
parent e93da23920
commit f5260ae757
3 changed files with 99 additions and 19 deletions

View File

@@ -145,6 +145,20 @@ if (gmock_build_tests)
# 'make test' or ctest.
enable_testing()
if (WIN32)
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/RunTest.ps1"
CONTENT
"$project_bin = \"${CMAKE_BINARY_DIR}/bin/$<CONFIG>\"
$env:Path = \"$project_bin;$env:Path\"
& $args")
elseif (MINGW)
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/RunTest.ps1"
CONTENT
"$project_bin = (cygpath --windows ${CMAKE_BINARY_DIR}/bin)
$env:Path = \"$project_bin;$env:Path\"
& $args")
endif()
############################################################
# C++ tests built with standard compiler flags.