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)
270270 tests/PythonQtTestMain.cpp
271271 )
272272
273+ set_property (SOURCE tests/PythonQtTestMain.cpp PROPERTY COMPILE_DEFINITIONS "main=tests_PythonQtTestMain" )
274+
273275 list (APPEND test_sources
274276 tests/PythonQtTests.cpp
275277 tests/PythonQtTests.h
@@ -289,9 +291,9 @@ if(BUILD_TESTING)
289291 QT4_WRAP_CPP(test_sources
290292 tests/PythonQtTestCleanup.h
291293 )
292- endif ()
293294
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 ()
295297
296298 add_executable (PythonQtCppTests ${test_sources} )
297299 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[])
6565 Py_Finalize ();
6666 }
6767
68+ #ifdef PythonQt_Wrap_Qtcore
6869 PythonQtTestCleanup cleanup;
6970 failCount += QTest::qExec (&cleanup, argc, argv);
7071
@@ -73,6 +74,8 @@ int main(int argc, char *argv[])
7374 } else {
7475 std::cout << " All tests passed successfully." << std::endl;
7576 }
77+ #endif
78+
7679 return failCount;
7780}
7881
You can’t perform that action at this time.
0 commit comments