aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/templates/wizards/autotest/files/tst.pro
blob: 1a4b00a5e8e2805a1ce055ba7b4ec1b6d5e73870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@if "%{TestFrameWork}" == "QtTest"
QT += testlib
@if "%{RequireGUI}" == "false"
QT -= gui

CONFIG += qt console warn_on depend_includepath testcase
CONFIG -= app_bundle
@else
QT += gui
CONFIG += qt warn_on depend_includepath testcase
@endif

TEMPLATE = app

SOURCES +=  %{TestCaseFileWithCppSuffix}
@endif
@if "%{TestFrameWork}" == "QtQuickTest"
CONFIG += warn_on qmltestcase

TEMPLATE = app

DISTFILES += \\
    %{TestCaseFileWithQmlSuffix}

@if "%{UseSetupCode}" === "false"
SOURCES += \\
    %{MainCppName}
@else
HEADERS += setup.h

SOURCES += \\
    %{MainCppName} \\
    setup.cpp
@endif
@endif
@if "%{TestFrameWork}" == "GTest"
include(gtest_dependency.pri)

TEMPLATE = app
@if "%{GTestCXX11}" == "true"
CONFIG += console c++11
@else
CONFIG += console
@endif
CONFIG -= app_bundle
CONFIG += thread
CONFIG -= qt

SOURCES += \\
        %{MainCppName} \\
        %{TestCaseFileGTestWithCppSuffix}
@endif
@if "%{TestFrameWork}" == "BoostTest"
TEMPLATE = app
CONFIG -= qt
CONFIG -= app_bundle
CONFIG += console

isEmpty(BOOST_INCLUDE_DIR): BOOST_INCLUDE_DIR=$$(BOOST_INCLUDE_DIR)
@if "%{BoostIncDir}" != ""
# set by Qt Creator wizard
isEmpty(BOOST_INCLUDE_DIR): BOOST_INCLUDE_DIR="%{BoostIncDir}"
@endif
!isEmpty(BOOST_INCLUDE_DIR): INCLUDEPATH *= $${BOOST_INCLUDE_DIR}

isEmpty(BOOST_INCLUDE_DIR): {
    message("BOOST_INCLUDE_DIR is not set, assuming Boost can be found automatically in your system")
}

SOURCES += \\
    %{MainCppName}
@endif
@if "%{TestFrameWork}" == "BoostTest_dyn"
TEMPLATE = app
CONFIG -= qt
CONFIG -= app_bundle
CONFIG += console

isEmpty(BOOST_INSTALL_DIR): BOOST_INSTALL_DIR=$$(BOOST_INSTALL_DIR)
@if "%{BoostInstallDir}" != ""
# set by Qt Creator wizard
isEmpty(BOOST_INSTALL_DIR): BOOST_INSTALL_DIR="%{BoostInstallDir}"
@endif
!isEmpty(BOOST_INSTALL_DIR) {
  win32: INCLUDEPATH *= $${BOOST_INSTALL_DIR}
  else: INCLUDEPATH *= $${BOOST_INSTALL_DIR}/include
}
# Windows: adapt to name scheme, e.g. lib64-msvc-14.2
!isEmpty(BOOST_INSTALL_DIR): LIBS *= -L$${BOOST_INSTALL_DIR}/lib
# Windows: adapt to name scheme, e.g. boost_unit_test_framework-vc142-mt-gd-x64-1_80
LIBS *= -lboost_unit_test_framework
DEFINES *= BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK

isEmpty(BOOST_INSTALL_DIR): {
    message("BOOST_INSTALL_DIR is not set, assuming Boost can be found automatically in your system")
}

SOURCES += \\
    %{MainCppName} \\
    %{TestCaseFileWithCppSuffix}
@endif
@if "%{TestFrameWork}" == "Catch2"
TEMPLATE = app
@if "%{Catch2NeedsQt}" == "true"
QT += gui
@else
CONFIG -= qt
CONFIG -= app_bundle
CONFIG += console
@endif

CONFIG += c++11

isEmpty(CATCH_INCLUDE_DIR): CATCH_INCLUDE_DIR=$$(CATCH_INCLUDE_DIR)
@if "%{CatchIncDir}" != ""
# set by Qt Creator wizard
isEmpty(CATCH_INCLUDE_DIR): CATCH_INCLUDE_DIR="%{CatchIncDir}"
@endif
!isEmpty(CATCH_INCLUDE_DIR): INCLUDEPATH *= $${CATCH_INCLUDE_DIR}

isEmpty(CATCH_INCLUDE_DIR): {
    message("CATCH_INCLUDE_DIR is not set, assuming Catch2 can be found automatically in your system")
}

SOURCES += \\
    main.cpp \\
    %{TestCaseFileWithCppSuffix}
@endif