aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/templates/wizards/autotest/files/tst.txt
diff options
context:
space:
mode:
Diffstat (limited to 'share/qtcreator/templates/wizards/autotest/files/tst.txt')
-rw-r--r--share/qtcreator/templates/wizards/autotest/files/tst.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.txt b/share/qtcreator/templates/wizards/autotest/files/tst.txt
index fe8e30e789d..516567cc633 100644
--- a/share/qtcreator/templates/wizards/autotest/files/tst.txt
+++ b/share/qtcreator/templates/wizards/autotest/files/tst.txt
@@ -57,6 +57,8 @@ target_link_libraries(%{TestCaseName} PRIVATE Qt${QT_VERSION_MAJOR}::QuickTest)
@if "%{TestFrameWork}" == "GTest"
@if "%{GTestCXX11}" == "true"
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions(-DGTEST_LANGUAGE_CXX11)
@endif
@@ -92,7 +94,7 @@ endif ()
include_directories(${GTestIncludes})
-add_executable(%{TestCaseName} %{MainCppName} %{TestCaseFileWithHeaderSuffix}
+add_executable(%{TestCaseName} %{MainCppName} %{TestCaseFileGTestWithCppSuffix}
${GTestFiles})
add_test(NAME %{TestCaseName} COMMAND %{TestCaseName})
target_link_libraries(%{TestCaseName} PRIVATE Threads::Threads)