summaryrefslogtreecommitdiff
path: root/share/qtcreator/templates/wizards/autotest/files/tst.qbs
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2019-08-21 13:54:19 +0200
committerChristian Stenger <christian.stenger@qt.io>2019-09-12 08:50:36 +0000
commit90189ec3d14e2cdb3777bb4bc09db4ee9bcaed69 (patch)
tree854feae6bcf32bf2be47457835689ec1cecbc705 /share/qtcreator/templates/wizards/autotest/files/tst.qbs
parent45cd20c4a05a9b8d7e8fef021f6008730233e88a (diff)
downloadqt-creator-90189ec3d14e2cdb3777bb4bc09db4ee9bcaed69.tar.gz
AutoTest: Wizard: Soften condition for gtest repository
Make the need for the googletest repository optional. The user may have gtest installed inside the system instead. Change-Id: I4959878fa893d6b8ed53fd612934d7cd4504a6b7 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'share/qtcreator/templates/wizards/autotest/files/tst.qbs')
-rw-r--r--share/qtcreator/templates/wizards/autotest/files/tst.qbs8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.qbs b/share/qtcreator/templates/wizards/autotest/files/tst.qbs
index 92a0656d65..e66605f0a5 100644
--- a/share/qtcreator/templates/wizards/autotest/files/tst.qbs
+++ b/share/qtcreator/templates/wizards/autotest/files/tst.qbs
@@ -26,8 +26,12 @@ CppApplication {
@if "%{TestFrameWork}" == "GTest"
property string googletestDir: {
if (typeof Environment.getEnv("GOOGLETEST_DIR") === 'undefined') {
- console.warn("Using googletest src dir specified at Qt Creator wizard")
- console.log("set GOOGLETEST_DIR as environment variable or Qbs property to get rid of this message")
+ if ("%{GTestRepository}" === "" && googleCommon.getGTestDir(qbs, undefined) !== "") {
+ console.warn("Using googletest from system")
+ } else {
+ console.warn("Using googletest src dir specified at Qt Creator wizard")
+ console.log("set GOOGLETEST_DIR as environment variable or Qbs property to get rid of this message")
+ }
return "%{GTestRepository}"
} else {
return Environment.getEnv("GOOGLETEST_DIR")