File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,8 @@ if(BUILD_TESTING)
270
270
tests/PythonQtTestMain.cpp
271
271
)
272
272
273
+ set_property (SOURCE tests/PythonQtTestMain.cpp PROPERTY COMPILE_DEFINITIONS "main=tests_PythonQtTestMain" )
274
+
273
275
list (APPEND test_sources
274
276
tests/PythonQtTests.cpp
275
277
tests/PythonQtTests.h
@@ -289,9 +291,9 @@ if(BUILD_TESTING)
289
291
QT4_WRAP_CPP (test_sources
290
292
tests/PythonQtTestCleanup.h
291
293
)
292
- endif ()
293
294
294
- set_property (SOURCE tests/PythonQtTestMain.cpp PROPERTY COMPILE_DEFINITIONS "main=tests_PythonQtTestMain" )
295
+ set_property (SOURCE tests/PythonQtTestMain.cpp APPEND PROPERTY COMPILE_DEFINITIONS "PythonQt_Wrap_Qtcore" )
296
+ endif ()
295
297
296
298
add_executable (PythonQtCppTests ${test_sources} )
297
299
target_link_libraries (PythonQtCppTests PythonQt )
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ int main(int argc, char *argv[])
65
65
Py_Finalize ();
66
66
}
67
67
68
+ #ifdef PythonQt_Wrap_Qtcore
68
69
PythonQtTestCleanup cleanup;
69
70
failCount += QTest::qExec (&cleanup, argc, argv);
70
71
@@ -73,6 +74,8 @@ int main(int argc, char *argv[])
73
74
} else {
74
75
std::cout << " All tests passed successfully." << std::endl;
75
76
}
77
+ #endif
78
+
76
79
return failCount;
77
80
}
78
81
You can’t perform that action at this time.
0 commit comments