aboutsummaryrefslogtreecommitdiffstats
path: root/googlemock
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock')
-rw-r--r--googlemock/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index 2a913080..78762b0c 100644
--- a/googlemock/CMakeLists.txt
+++ b/googlemock/CMakeLists.txt
@@ -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.