From 4d63dfffb661115f58cca60c80c4649ba982e01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Wed, 14 Aug 2019 17:40:18 +0200 Subject: CMake modularization: macros creation First step of this process that only considers the idea of encapsulate the diffrent CMake processes we currently have in all our main CMakeLists.txt files. This patch simply takes some sections of the existing cmake files and move them to a macro file. Additionally, a couple of macros were written twice in shiboken and pyside, so now they are only once. Task-number: PYSIDE-1033 Change-Id: I2c63d8a2eba3d8951097ec9c9042c782fde5dd62 Reviewed-by: Alexandru Croitor Reviewed-by: Qt CI Bot Reviewed-by: Christian Tismer --- sources/shiboken2/tests/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sources/shiboken2/tests/CMakeLists.txt') diff --git a/sources/shiboken2/tests/CMakeLists.txt b/sources/shiboken2/tests/CMakeLists.txt index 085a4344c..464707a9a 100644 --- a/sources/shiboken2/tests/CMakeLists.txt +++ b/sources/shiboken2/tests/CMakeLists.txt @@ -1,3 +1,7 @@ +if(BUILD_TESTS) + find_package(Qt5Test 5.12 REQUIRED) +endif() + add_subdirectory(libminimal) if(NOT DEFINED MINIMAL_TESTS) add_subdirectory(libsample) @@ -74,24 +78,24 @@ add_subdirectory(dumpcodemodel) if (NOT APIEXTRACTOR_DOCSTRINGS_DISABLED) # project(sphinxtabletest) -# +# # # TODO # set(sphinxtabletest_SRC sphinxtabletest.cpp) # qt4_automoc(${sphinxtabletest_SRC}) -# +# # include_directories(${QT_INCLUDE_DIR} # ${QT_QTCORE_INCLUDE_DIR} # ${CMAKE_CURRENT_BINARY_DIR} # ${qtdoc_generator_SOURCE_DIR}) -# +# # add_executable(sphinxtabletest ${sphinxtabletest_SRC}) -# +# # target_link_libraries(sphinxtabletest # ${QT_QTTEST_LIBRARY} # ${APIEXTRACTOR_LIBRARY} # qtdoc_generator # genrunner) -# +# # add_test("sphinxtable" sphinxtabletest) # if (INSTALL_TESTS) # install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/sphinxtabletest DESTINATION ${TEST_INSTALL_DIR}) -- cgit v1.2.3