Skip to content

Commit

Permalink
Rid of 'special case' markers
Browse files Browse the repository at this point in the history
It's unlikely we will ever use pro2cmake at this project stage,
so it doesn't make any sense to keep the 'special case' markers
in the CMake scripts. Remove them and replace with TODO where
needed.

Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7
Reviewed-by: Amir Masoud Abdol <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
semlanik committed Apr 13, 2023
1 parent 0649938 commit 4fb7eeb
Show file tree
Hide file tree
Showing 26 changed files with 45 additions and 80 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration

# Need an explicit call at the top level. This is the absolute minimum version
# needed to configure the project with any combination of enabled features.
# The call to qt_build_repo_begin() will upgrade policies further.
Expand Down
1 change: 0 additions & 1 deletion config.tests/separate_debug_info/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration
cmake_minimum_required(VERSION 3.16)
project(objcopytest LANGUAGES CXX)
add_executable(objcopytest main.cpp)
Expand Down
20 changes: 3 additions & 17 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ SSL_free(SSL_new(0));
}
")

# special case end
qt_find_package(WrapZSTD 1.3 PROVIDED_TARGETS WrapZSTD::WrapZSTD MODULE_NAME global QMAKE_LIB zstd)
qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus)
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev)
Expand Down Expand Up @@ -465,7 +464,6 @@ qt_feature("optimize_size"
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
qt_feature_config("optimize_size" QMAKE_PRIVATE_CONFIG)
# special case begin
qt_feature("optimize_full"
LABEL "Fully optimize release builds (-O3)"
AUTODETECT OFF
Expand All @@ -477,7 +475,6 @@ qt_feature("msvc_obj_debug_info"
AUTODETECT OFF
)
qt_feature_config("msvc_obj_debug_info" QMAKE_PRIVATE_CONFIG)
# special case end
qt_feature("pkg-config" PUBLIC
LABEL "Using pkg-config"
AUTODETECT NOT APPLE AND NOT WIN32 AND NOT ANDROID
Expand Down Expand Up @@ -838,7 +835,9 @@ qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1")
qt_feature_config("mips_dspr2" QMAKE_PRIVATE_CONFIG)
qt_feature("neon" PRIVATE
LABEL "NEON"
CONDITION ( ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_neon ) OR QT_FORCE_FEATURE_neon # special case
CONDITION ( ( ( TEST_architecture_arch STREQUAL arm ) OR
( TEST_architecture_arch STREQUAL arm64 ) ) AND
TEST_arch_${TEST_architecture_arch}_subarch_neon ) OR QT_FORCE_FEATURE_neon
)
qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1")
qt_feature_config("neon" QMAKE_PRIVATE_CONFIG)
Expand Down Expand Up @@ -904,7 +903,6 @@ qt_feature("stdlib-libcpp" PRIVATE
AUTODETECT OFF
CONDITION LINUX AND NOT ANDROID
)
# special case begin
# Check whether CMake was built with zstd support.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21552
if(NOT DEFINED CACHE{QT_CMAKE_ZSTD_SUPPORT})
Expand All @@ -921,7 +919,6 @@ if(NOT DEFINED CACHE{QT_CMAKE_ZSTD_SUPPORT})
unset(qt_check_zstd_exit_code)
endif()
endif()
# special case end
qt_feature("thread" PUBLIC
SECTION "Kernel"
LABEL "Thread support"
Expand Down Expand Up @@ -1061,11 +1058,9 @@ qt_configure_add_summary_entry(
ARGS "optimize_size"
CONDITION NOT QT_FEATURE_debug OR QT_FEATURE_debug_and_release
)
# special case begin
qt_configure_add_summary_entry(
ARGS "optimize_full"
)
# special case end
qt_configure_add_summary_entry(ARGS "shared")
qt_configure_add_summary_entry(
ARGS "ccache"
Expand Down Expand Up @@ -1161,13 +1156,6 @@ qt_configure_add_report_entry(
MESSAGE "Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library."
CONDITION NOT QT_FEATURE_shared
)
# special case begin
# qt_configure_add_report_entry(
# TYPE ERROR
# MESSAGE "Debug build without Release build is not currently supported on ios see QTBUG-71990. Use -debug-and-release."
# CONDITION IOS AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
# )
# special case end
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "-debug-and-release is only supported on Darwin and Windows platforms. Qt can be built in release mode with separate debug information, so -debug-and-release is no longer necessary."
Expand Down Expand Up @@ -1223,7 +1211,6 @@ ${TEST_x86intrin_OUTPUT}
)
endif()
endif()
# special case begin
qt_configure_add_report_entry(
TYPE ERROR
MESSAGE "Setting a library infix is not supported for framework builds."
Expand All @@ -1242,7 +1229,6 @@ qt_configure_add_report_entry(
if(WASM)
qt_extra_definition("QT_EMCC_VERSION" "\"${EMCC_VERSION}\"" PUBLIC)
endif()
# special case end
qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC)
qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)
qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)
Expand Down
1 change: 0 additions & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

# special case skip regeneration
#
# Copy/Install doc configuration files to the build/install directory
#
Expand Down
10 changes: 3 additions & 7 deletions qmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ endif()

qt_get_tool_target_name(target_name qmake)
qt_internal_add_tool(${target_name}
TOOLS_TARGET Core # special case
TOOLS_TARGET Core
USER_FACING
NO_UNITY_BUILD
INSTALL_VERSIONED_LINK
Expand Down Expand Up @@ -118,7 +118,6 @@ qt_internal_extend_target(${target_name} CONDITION MACOS
"-fconstant-cfstrings"
)

# special case big
qt_internal_extend_target(${target_name} CONDITION WIN32
SOURCES
library/registry.cpp
Expand All @@ -132,18 +131,15 @@ qt_internal_extend_target(${target_name} CONDITION CLANG AND WIN32
"-Wno-microsoft-enum-value"
)

# special case:
set_target_properties(${target_name} PROPERTIES
AUTOMOC OFF
AUTORCC OFF
AUTOUIC OFF
)

qt_internal_apply_gc_binaries(${target_name} PRIVATE) # special case
qt_skip_warnings_are_errors(${target_name}) # special case
qt_internal_apply_gc_binaries(${target_name} PRIVATE)
qt_skip_warnings_are_errors(${target_name})

# special case begin
qt_internal_add_docs(${target_name}
doc/qmake.qdocconf
)
# special case end
4 changes: 1 addition & 3 deletions qt_cmdline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ qt_commandline_option(openssl-runtime TYPE void NAME openssl VALUE runtime)
qt_commandline_option(linker TYPE optionalString VALUES bfd gold lld mold)
qt_commandline_option(ltcg TYPE boolean)
qt_commandline_option(intelcet TYPE boolean)
# special case begin
qt_commandline_option(make TYPE addString VALUES examples libs tests tools
benchmarks manual-tests minimal-static-tests)
# special case end
qt_commandline_option(make-tool TYPE string)
qt_commandline_option(mips_dsp TYPE boolean)
qt_commandline_option(mips_dspr2 TYPE boolean)
qt_commandline_option(mp TYPE boolean NAME msvc_mp)
qt_commandline_option(nomake TYPE addString VALUES examples tests tools benchmarks
manual-tests minimal-static-tests) # special case
manual-tests minimal-static-tests)
qt_commandline_option(opensource TYPE void NAME commercial VALUE no)
qt_commandline_option(optimize-debug TYPE boolean NAME optimize_debug)
qt_commandline_option(optimize-size TYPE boolean NAME optimize_size)
Expand Down
3 changes: 2 additions & 1 deletion src/corelib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1306,10 +1306,11 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_ctf AND QT_FEATURE_library
tracing
)

# These files are included by qmutex.cpp
set_source_files_properties(
thread/qmutex_mac.cpp
thread/qmutex_unix.cpp
PROPERTIES HEADER_FILE_ONLY ON) # special case: These files are included by qmutex.cpp!
PROPERTIES HEADER_FILE_ONLY ON)

# Remove QT_NO_CAST_TO_ASCII to ensure that the symbols are included in the library.
if(WIN32)
Expand Down
2 changes: 0 additions & 2 deletions src/corelib/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ int pipes[2];
}
")

# special case begin
# cxx11_future
if (UNIX AND NOT ANDROID AND NOT QNX AND NOT INTEGRITY)
set(cxx11_future_TEST_LIBRARIES pthread)
Expand All @@ -146,7 +145,6 @@ std::future<int> f = std::async([]() { return 42; });
return 0;
}
")
# special case end

# cxx11_random
qt_config_compile_test(cxx11_random
Expand Down
3 changes: 2 additions & 1 deletion src/dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ qt_internal_add_module(DBus
GENERATE_CPP_EXPORTS
)

# This file is included by qdbusargument.cpp
set_source_files_properties(qdbusmarshaller.cpp
PROPERTIES HEADER_FILE_ONLY ON) # special case: This file is included by qdbusargument.cpp
PROPERTIES HEADER_FILE_ONLY ON)

## Scopes:
#####################################################################
Expand Down
26 changes: 11 additions & 15 deletions src/gui/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system)


#### Libraries
qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR HURD) # special case
qt_set01(X11_SUPPORTED LINUX OR HPUX OR FREEBSD OR NETBSD OR OPENBSD OR SOLARIS OR
HURD)
qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi)
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb)
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm)
Expand Down Expand Up @@ -57,7 +58,8 @@ qt_find_package(Mtdev PROVIDED_TARGETS PkgConfig::Mtdev MODULE_NAME gui QMAKE_LI
qt_find_package(WrapOpenGL PROVIDED_TARGETS WrapOpenGL::WrapOpenGL MODULE_NAME gui QMAKE_LIB opengl)
qt_find_package(GLESv2 PROVIDED_TARGETS GLESv2::GLESv2 MODULE_NAME gui QMAKE_LIB opengl_es2)
qt_find_package(Tslib PROVIDED_TARGETS PkgConfig::Tslib MODULE_NAME gui QMAKE_LIB tslib)
qt_find_package(WrapVulkanHeaders PROVIDED_TARGETS WrapVulkanHeaders::WrapVulkanHeaders MODULE_NAME gui QMAKE_LIB vulkan MARK_OPTIONAL) # special case
qt_find_package(WrapVulkanHeaders PROVIDED_TARGETS WrapVulkanHeaders::WrapVulkanHeaders
MODULE_NAME gui QMAKE_LIB vulkan MARK_OPTIONAL)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
qt_find_package(Wayland PROVIDED_TARGETS Wayland::Server MODULE_NAME gui QMAKE_LIB wayland_server)
endif()
Expand Down Expand Up @@ -277,8 +279,8 @@ qt_config_compile_test(egl_viv
LABEL "i.Mx6 EGL"
LIBRARIES
EGL::EGL
COMPILE_OPTIONS # special case
"-DEGL_API_FB=1" # special case
COMPILE_OPTIONS
"-DEGL_API_FB=1"
CODE
"#include <EGL/egl.h>
#include <EGL/eglvivante.h>
Expand Down Expand Up @@ -406,11 +408,9 @@ ioctl(fd, FBIOGET_VSCREENINFO, &vinfo);
")

# opengles3
# special case begin
if(WASM)
set(extra_compiler_options "-s FULL_ES3=1")
endif()
# special case end

set(test_libs GLESv2::GLESv2)
if(INTEGRITY AND _qt_igy_gui_libs)
Expand All @@ -421,9 +421,7 @@ qt_config_compile_test(opengles3
LABEL "OpenGL ES 3.0"
LIBRARIES
${test_libs}
# special case begin
COMPILE_OPTIONS ${extra_compiler_options}
# special case end
CODE
"#ifdef __APPLE__
# include <OpenGLES/ES3/gl.h>
Expand Down Expand Up @@ -553,7 +551,6 @@ libinput_event_pointer_get_scroll_value_v120(nullptr, LIBINPUT_POINTER_AXIS_SCRO
}
")

# special case begin
# directwrite (assumes DirectWrite2)
qt_config_compile_test(directwrite
LABEL "WINDOWS directwrite"
Expand Down Expand Up @@ -615,7 +612,6 @@ int main(int, char **)
return 0;
}
")
# special case end


#### Features
Expand All @@ -633,21 +629,21 @@ qt_feature("directfb" PRIVATE
)
qt_feature("directwrite" PRIVATE
LABEL "DirectWrite"
CONDITION TEST_directwrite # special case
CONDITION TEST_directwrite
EMIT_IF WIN32
)
qt_feature("directwrite3" PRIVATE
LABEL "DirectWrite 3"
CONDITION QT_FEATURE_directwrite AND TEST_directwrite3 # special case
CONDITION QT_FEATURE_directwrite AND TEST_directwrite3
EMIT_IF WIN32
)
qt_feature("direct2d" PRIVATE
LABEL "Direct 2D"
CONDITION WIN32 AND NOT WINRT AND TEST_d2d1 # special case
CONDITION WIN32 AND NOT WINRT AND TEST_d2d1
)
qt_feature("direct2d1_1" PRIVATE
LABEL "Direct 2D 1.1"
CONDITION QT_FEATURE_direct2d AND TEST_d2d1_1 # special case
CONDITION QT_FEATURE_direct2d AND TEST_d2d1_1
)
qt_feature("evdev" PRIVATE
LABEL "evdev"
Expand Down Expand Up @@ -1316,7 +1312,7 @@ qt_configure_end_summary_section() # end of "GL integrations" section
qt_configure_end_summary_section() # end of "XCB" section
qt_configure_add_summary_section(NAME "Windows")
qt_configure_add_summary_entry(ARGS "direct2d")
qt_configure_add_summary_entry(ARGS "direct2d1_1") ### special case
qt_configure_add_summary_entry(ARGS "direct2d1_1")
qt_configure_add_summary_entry(ARGS "directwrite")
qt_configure_add_summary_entry(ARGS "directwrite3")
qt_configure_end_summary_section() # end of "Windows" section
Expand Down
6 changes: 4 additions & 2 deletions src/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,11 @@ qt_internal_add_docs(Network
doc/qtnetwork.qdocconf
)

qt_internal_extend_target(Network CONDITION WIN32 PUBLIC_LIBRARIES ws2_32) # special case: mkspecs/common/msvc-desktop.conf
# See mkspecs/common/msvc-desktop.conf
qt_internal_extend_target(Network CONDITION WIN32 PUBLIC_LIBRARIES ws2_32)

qt_internal_extend_target(Network CONDITION QNX PUBLIC_LIBRARIES socket) # special case: mkspecs/common/qcc-base-qnx.conf
# See mkspecs/common/qcc-base-qnx.conf
qt_internal_extend_target(Network CONDITION QNX PUBLIC_LIBRARIES socket)

qt_internal_extend_target(Network CONDITION SOLARIS PUBLIC_LIBRARIES socket nsl)

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ if(QT_FEATURE_libinput)
add_subdirectory(libinput)
endif()
if(FREEBSD)
# add_subdirectory(bsdkeyboard) # special case TODO
# add_subdirectory(bsdmouse) # special case TODO
# add_subdirectory(bsdkeyboard) # TODO: QTBUG-112770
# add_subdirectory(bsdmouse) # TODO: QTBUG-112770
endif()
6 changes: 3 additions & 3 deletions src/plugins/platforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ if(QT_FEATURE_vnc AND TARGET Qt::Network)
add_subdirectory(vnc)
endif()
if(FREEBSD)
# add_subdirectory(bsdfb) # special case TODO
# add_subdirectory(bsdfb) # TODO: QTBUG-112768
endif()
if(HAIKU)
# add_subdirectory(haiku) # special case TODO
# add_subdirectory(haiku) # TODO: QTBUG-112768
endif()
if(WASM)
add_subdirectory(wasm)
endif()
if(QT_FEATURE_integrityfb)
# add_subdirectory(integrity) # special case TODO
# add_subdirectory(integrity) # TODO: QTBUG-112768
endif()
if(QT_FEATURE_vkkhrdisplay)
add_subdirectory(vkkhrdisplay)
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/platforms/eglfs/deviceintegration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ if(QT_FEATURE_eglfs_egldevice)
add_subdirectory(eglfs_kms_egldevice)
endif()
if(QT_FEATURE_eglfs_vsp2)
# add_subdirectory(eglfs_kms_vsp2) # special case TODO
# add_subdirectory(eglfs_kms_vsp2) # TODO: QTBUG-112769
endif()
if(QT_FEATURE_eglfs_brcm)
# add_subdirectory(eglfs_brcm) # special case TODO
# add_subdirectory(eglfs_brcm) # TODO: QTBUG-112769
endif()
if(QT_FEATURE_eglfs_mali)
add_subdirectory(eglfs_mali)
Expand All @@ -26,7 +26,7 @@ if(QT_FEATURE_eglfs_viv)
add_subdirectory(eglfs_viv)
endif()
if(QT_FEATURE_eglfs_rcar)
# add_subdirectory(eglfs_rcar) # special case TODO
# add_subdirectory(eglfs_rcar) # TODO: QTBUG-112769
endif()
if(QT_FEATURE_eglfs_viv_wl)
add_subdirectory(eglfs_viv_wl)
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/platforms/xcb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ qt_internal_add_module(XcbQpaPrivate
XCB::SYNC
XCB::XCB
XCB::XFIXES
# XCB::XINPUT # special case remove handled below
XCB::XKB
XKB::XKB
NO_UNITY_BUILD # X11 define clashes
Expand Down Expand Up @@ -178,5 +177,5 @@ qt_internal_add_plugin(QXcbIntegrationPlugin

add_subdirectory(gl_integrations)
if(OFF)
add_subdirectory(xcb-static) # special case TODO: xcb-static sub folder
add_subdirectory(xcb-static)
endif()
Loading

0 comments on commit 4fb7eeb

Please sign in to comment.