summaryrefslogtreecommitdiffstats
path: root/googlemock/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthieu <mateo.longo@gmail.com>2018-10-02 21:40:37 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-02 21:41:16 (GMT)
commitf5260ae757a681566d8f7d0558b8dc0551036506 (patch)
treed1ef53caf66c1299d06ac0677b22fbbfef291d8f /googlemock/CMakeLists.txt
parente93da23920e5b6887d6a6a291c3a59f83f5b579e (diff)
downloadgoogletest-f5260ae757a681566d8f7d0558b8dc0551036506.zip
googletest-f5260ae757a681566d8f7d0558b8dc0551036506.tar.gz
googletest-f5260ae757a681566d8f7d0558b8dc0551036506.tar.bz2
Merge c798e39a4f96f5a985126cc3fab4738b6412cfc1 into e93da23920e5b6887d6a6a291c3a59f83f5b579e
Closes #1836 PiperOrigin-RevId: 215461025
Diffstat (limited to 'googlemock/CMakeLists.txt')
-rw-r--r--googlemock/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index 2a91308..78762b0 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.