aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthieu <mateo.longo@gmail.com>2018-10-02 17:40:37 -0400
committerGennadiy Civil <misterg@google.com>2018-10-02 17:41:16 -0400
commitf5260ae757a681566d8f7d0558b8dc0551036506 (patch)
treed1ef53caf66c1299d06ac0677b22fbbfef291d8f /googletest/CMakeLists.txt
parente93da23920e5b6887d6a6a291c3a59f83f5b579e (diff)
downloadgoogletest-f5260ae757a681566d8f7d0558b8dc0551036506.tar.gz
googletest-f5260ae757a681566d8f7d0558b8dc0551036506.tar.bz2
googletest-f5260ae757a681566d8f7d0558b8dc0551036506.zip
Merge c798e39a4f96f5a985126cc3fab4738b6412cfc1 into e93da23920e5b6887d6a6a291c3a59f83f5b579e
Closes #1836 PiperOrigin-RevId: 215461025
Diffstat (limited to 'googletest/CMakeLists.txt')
-rw-r--r--googletest/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
index e4e99e83..925f9c20 100644
--- a/googletest/CMakeLists.txt
+++ b/googletest/CMakeLists.txt
@@ -187,6 +187,20 @@ if (gtest_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.