aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2020-02-17 15:07:37 +0100
committerCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2020-06-08 10:30:05 +0200
commit15b509e4ab51a0a999190ef4f567a79cbdb541f3 (patch)
tree54e72166ccbbe9068524f02132853f284a972f27 /sources
parent45d7dd636adfcbd9e086376f4260d58cc9901d41 (diff)
Clean the build/install output a bit
* Adding STATUS or WARNING to a couple of message() calls. * Replacing some print() by log.info() * Changing some '*' by '-' * Align configuration outputs to check paths easily * Adding big message to check when shiboken2/pyside2 is being built. * Including the cmake_minimum_required() function instead of an 'if'. Change-Id: Idb6c5797286d400192d083403063e2ae582e3fe6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/pyside2/CMakeLists.txt2
-rw-r--r--sources/shiboken2/CMakeLists.txt14
-rw-r--r--sources/shiboken2/data/shiboken_helpers.cmake6
-rw-r--r--sources/shiboken2/doc/CMakeLists.txt6
-rw-r--r--sources/shiboken2/libshiboken/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/CMakeLists.txt34
-rw-r--r--sources/shiboken2/tests/test_generator/CMakeLists.txt12
7 files changed, 35 insertions, 41 deletions
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index bab97f41e..dc2beded0 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -83,7 +83,7 @@ find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core)
add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
-message("result:" "${GL_H}")
+message(STATUS "GL Headers path:" "${GL_H}")
include(FindQt5Extra)
set(XVFB_EXEC "")
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 5877971a9..3de5d3223 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -66,13 +66,13 @@ set(shiboken2_library_so_version "${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VER
compute_config_py_values(shiboken2_VERSION)
## For debugging the PYTHON* variables
-message("PYTHONLIBS_FOUND: " ${PYTHONLIBS_FOUND})
-message("PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES})
-message("PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
-message("PYTHON_DEBUG_LIBRARIES: " ${PYTHON_DEBUG_LIBRARIES})
-message("PYTHONINTERP_FOUND: " ${PYTHONINTERP_FOUND})
-message("PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE})
-message("PYTHON_VERSION: " ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
+message(STATUS "PYTHONLIBS_FOUND: " ${PYTHONLIBS_FOUND})
+message(STATUS "PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES})
+message(STATUS "PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
+message(STATUS "PYTHON_DEBUG_LIBRARIES: " ${PYTHON_DEBUG_LIBRARIES})
+message(STATUS "PYTHONINTERP_FOUND: " ${PYTHONINTERP_FOUND})
+message(STATUS "PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE})
+message(STATUS "PYTHON_VERSION: " ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
if (NOT PYTHON_EXTENSION_SUFFIX)
get_python_extension_suffix()
diff --git a/sources/shiboken2/data/shiboken_helpers.cmake b/sources/shiboken2/data/shiboken_helpers.cmake
index 6bd75d0ea..5e0c6ea72 100644
--- a/sources/shiboken2/data/shiboken_helpers.cmake
+++ b/sources/shiboken2/data/shiboken_helpers.cmake
@@ -244,7 +244,7 @@ macro(get_python_extension_suffix)
"
OUTPUT_VARIABLE PYTHON_EXTENSION_SUFFIX
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_EXTENSION_SUFFIX: " ${PYTHON_EXTENSION_SUFFIX})
+ message(STATUS "PYTHON_EXTENSION_SUFFIX: " ${PYTHON_EXTENSION_SUFFIX})
endmacro()
macro(get_llvm_config)
@@ -260,7 +260,7 @@ macro(get_llvm_config)
"
OUTPUT_VARIABLE LLVM_CONFIG
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("LLVM_CONFIG: " ${LLVM_CONFIG})
+ message(STATUS "LLVM_CONFIG: " ${LLVM_CONFIG})
endmacro()
macro(get_python_arch)
@@ -271,7 +271,7 @@ macro(get_python_arch)
"
OUTPUT_VARIABLE PYTHON_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_ARCH: " ${PYTHON_ARCH})
+ message(STATUS "PYTHON_ARCH: " ${PYTHON_ARCH})
endmacro()
macro(shiboken_parse_all_arguments prefix type flags options multiopts)
diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt
index faad446a1..9fee96298 100644
--- a/sources/shiboken2/doc/CMakeLists.txt
+++ b/sources/shiboken2/doc/CMakeLists.txt
@@ -1,7 +1,9 @@
+cmake_minimum_required(VERSION 3.1)
+
find_program(SPHINX sphinx-build DOC "Path to sphinx-build binary.")
if (SPHINX)
- message("-- sphinx-build - found")
+ message(STATUS "sphinx-build - found")
configure_file(conf.py.in conf.py @ONLY)
# conditional tag for sphinx build
#string(JOIN "_" SPHINX_TAG ${DOC_OUTPUT_FORMAT} "format")
@@ -39,7 +41,7 @@ except:
VERBATIM)
endif()
else()
- message("-- sphinx-build - not found! doc target disabled")
+ message(WARNING "sphinx-build - not found! doc target disabled")
if (WIN32)
# if jom is used and we have no sphinx, then jom will crash.
# so for windows, we always create a doc target (until jom gets fixed...)
diff --git a/sources/shiboken2/libshiboken/CMakeLists.txt b/sources/shiboken2/libshiboken/CMakeLists.txt
index a38da8d89..dee5dbd21 100644
--- a/sources/shiboken2/libshiboken/CMakeLists.txt
+++ b/sources/shiboken2/libshiboken/CMakeLists.txt
@@ -14,7 +14,7 @@ macro(get_numpy_location)
break"
OUTPUT_VARIABLE PYTHON_NUMPY_LOCATION
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_NUMPY_LOCATION: " ${PYTHON_NUMPY_LOCATION})
+ message(STATUS "PYTHON_NUMPY_LOCATION: " ${PYTHON_NUMPY_LOCATION})
endmacro()
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
diff --git a/sources/shiboken2/tests/CMakeLists.txt b/sources/shiboken2/tests/CMakeLists.txt
index 0a9a6f11a..2ba951de1 100644
--- a/sources/shiboken2/tests/CMakeLists.txt
+++ b/sources/shiboken2/tests/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.1)
+
if(BUILD_TESTS)
find_package(Qt${QT_MAJOR_VERSION}Test 5.12 REQUIRED)
endif()
@@ -42,24 +44,20 @@ if(NOT CTEST_TESTING_TIMEOUT)
set(CTEST_TESTING_TIMEOUT 60)
endif()
-if(CMAKE_VERSION VERSION_LESS 2.8)
- message("CMake version greater than 2.8 necessary to run tests")
-else()
- get_filename_component(BUILD_DIR "${libminimal_BINARY_DIR}" DIRECTORY)
- get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
- get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
- foreach(test_file ${TEST_FILES})
- string(REGEX MATCH "/([^/]+)(binding|module)/([^/]+)_test.py" tmp ${test_file})
- set(test_name "${CMAKE_MATCH_1}_${CMAKE_MATCH_3}")
- list(FIND test_blacklist ${test_name} expect_fail)
- add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_file})
- set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR}")
- set_tests_properties(${test_name} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT})
- if (${expect_fail} GREATER -1)
- set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE)
- endif()
- endforeach()
-endif()
+get_filename_component(BUILD_DIR "${libminimal_BINARY_DIR}" DIRECTORY)
+get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
+get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
+foreach(test_file ${TEST_FILES})
+ string(REGEX MATCH "/([^/]+)(binding|module)/([^/]+)_test.py" tmp ${test_file})
+ set(test_name "${CMAKE_MATCH_1}_${CMAKE_MATCH_3}")
+ list(FIND test_blacklist ${test_name} expect_fail)
+ add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_file})
+ set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR}")
+ set_tests_properties(${test_name} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT})
+ if (${expect_fail} GREATER -1)
+ set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE)
+ endif()
+endforeach()
add_subdirectory(dumpcodemodel)
diff --git a/sources/shiboken2/tests/test_generator/CMakeLists.txt b/sources/shiboken2/tests/test_generator/CMakeLists.txt
index da8cde6f8..07611e32c 100644
--- a/sources/shiboken2/tests/test_generator/CMakeLists.txt
+++ b/sources/shiboken2/tests/test_generator/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
project(test_generator)
set(dummy_generator_SRC dummygenerator.cpp)
@@ -32,15 +33,8 @@ if(WIN32)
endif()
macro(m_add_test testname)
- if(CMAKE_VERSION VERSION_LESS 2.8)
- add_test(${testname} ${CMAKE_COMMAND} -DTEST=${testname}
- -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
- -DENV_PATH=${ENV_PATH} -DENV_QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}
- -P ${CMAKE_CURRENT_SOURCE_DIR}/run_test.cmake)
- else()
- add_test(${testname} ${testname})
- set_property(TEST ${testname} PROPERTY ENVIRONMENT "PATH=${ENV_PATH}" "QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}")
- endif()
+ add_test(${testname} ${testname})
+ set_property(TEST ${testname} PROPERTY ENVIRONMENT "PATH=${ENV_PATH}" "QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}")
endmacro()
macro(declare_test testname)