CMake: Fix typos

Found by codespell

Change-Id: I4907e423b6b345acf82f2d7e0ed62479719d694e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 04cc705947a4f8e96f98f228a505774293c97840)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Kai Köhne 2022-06-10 16:41:59 +02:00 committed by Qt Cherry-pick Bot
parent bdfb65dc33
commit 43691ca752
20 changed files with 27 additions and 26 deletions

View File

@ -68,7 +68,7 @@
# If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property # If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property
# of the imported target for <component> will be set to contain the imported # of the imported target for <component> will be set to contain the imported
# targets for the components listed in <name>_<component>_component_deps. # targets for the components listed in <name>_<component>_component_deps.
# <component>_FOUND will also be set to false if any of the compoments in # <component>_FOUND will also be set to false if any of the components in
# <name>_<component>_component_deps are not found. This requires the components # <name>_<component>_component_deps are not found. This requires the components
# in <name>_<component>_component_deps to be listed before <component> in the # in <name>_<component>_component_deps to be listed before <component> in the
# COMPONENTS argument. # COMPONENTS argument.

View File

@ -53,7 +53,7 @@ function(qt_internal_add_app target)
# but don't enable macOS bundles. # but don't enable macOS bundles.
# Bundles are enabled in a separate set_target_properties call if an Info.plist file # Bundles are enabled in a separate set_target_properties call if an Info.plist file
# is provided. # is provided.
# Similary, the Windows GUI flag is disabled in a separate call # Similarly, the Windows GUI flag is disabled in a separate call
# if CONFIG += console was encountered during conversion. # if CONFIG += console was encountered during conversion.
set_target_properties("${target}" PROPERTIES WIN32_EXECUTABLE TRUE) set_target_properties("${target}" PROPERTIES WIN32_EXECUTABLE TRUE)

View File

@ -159,7 +159,7 @@ function(qt_internal_set_up_global_paths)
# #
# These values should be prepended to file paths in commands or properties, # These values should be prepended to file paths in commands or properties,
# in order to correctly place generated Config files, generated Targets files, # in order to correctly place generated Config files, generated Targets files,
# excutables / libraries, when copying / installing files, etc. # executables / libraries, when copying / installing files, etc.
# #
# The build dir variables will always be absolute paths. # The build dir variables will always be absolute paths.
# The QT_INSTALL_DIR variable will have a relative path in a prefix build, # The QT_INSTALL_DIR variable will have a relative path in a prefix build,

View File

@ -3,8 +3,9 @@
# output-file is relative to ${CMAKE_CURRENT_BINARY_DIR} # output-file is relative to ${CMAKE_CURRENT_BINARY_DIR}
# #
# This function is similar to file(GENERATE OUTPUT) except it writes the content # This function is similar to file(GENERATE OUTPUT) except it writes the content
# to the file at configure time, rather than at generate time. Once CMake 3.18 is released, it can use file(CONFIGURE) in its implmenetation. Until then, it # to the file at configure time, rather than at generate time. Once CMake 3.18 is released, it can
# uses configure_file() with a generic input file as source, when used with the CONTENT signature. # use file(CONFIGURE) in its implementation. Until then, it uses configure_file() with a generic
# input file as source, when used with the CONTENT signature.
function(qt_configure_file) function(qt_configure_file)
qt_parse_all_arguments(arg "qt_configure_file" "" "OUTPUT;INPUT;CONTENT" "" ${ARGN}) qt_parse_all_arguments(arg "qt_configure_file" "" "OUTPUT;INPUT;CONTENT" "" ${ARGN})

View File

@ -6,7 +6,7 @@
# The argument accepts 'Bootstrap' or 'None' values. If the argument value is set to # The argument accepts 'Bootstrap' or 'None' values. If the argument value is set to
# 'Bootstrap' the Qt::Bootstrap library is linked to the executable instead of Qt::Core. # 'Bootstrap' the Qt::Bootstrap library is linked to the executable instead of Qt::Core.
# The 'None' value points that core library is not necessary and avoids linking neither # The 'None' value points that core library is not necessary and avoids linking neither
# Qt::Core or Qt::Bootstrap libraries. Otherwise the Qt::Core library will be publically # Qt::Core or Qt::Bootstrap libraries. Otherwise the Qt::Core library will be publicly
# linked to the executable target by default. # linked to the executable target by default.
function(qt_internal_add_executable name) function(qt_internal_add_executable name)
qt_parse_all_arguments(arg "qt_internal_add_executable" qt_parse_all_arguments(arg "qt_internal_add_executable"

View File

@ -25,7 +25,7 @@ macro(qt_find_package)
# found as part of a find_dependency() call from a ModuleDependencies.cmake file (or similar), # found as part of a find_dependency() call from a ModuleDependencies.cmake file (or similar),
# and the provided target is also found, that means this might have been an unnecessary # and the provided target is also found, that means this might have been an unnecessary
# qt_find_package() call, because the dependency was already found via some other transitive # qt_find_package() call, because the dependency was already found via some other transitive
# dependency. Return early, so that CMake doesn't fail wiht an error with trying to promote the # dependency. Return early, so that CMake doesn't fail with an error with trying to promote the
# targets to be global. This behavior is not enabled by default, because there are cases # targets to be global. This behavior is not enabled by default, because there are cases
# when a regular find_package() (non qt_) can find a package (Freetype -> PNG), and a subsequent # when a regular find_package() (non qt_) can find a package (Freetype -> PNG), and a subsequent
# qt_find_package(PNG PROVIDED_TARGET PNG::PNG) still needs to succeed and register the provided # qt_find_package(PNG PROVIDED_TARGET PNG::PNG) still needs to succeed and register the provided

View File

@ -68,7 +68,7 @@ function(qt_internal_set_warnings_are_errors_flags target target_scope)
set(warnings_are_errors_enabled_genex set(warnings_are_errors_enabled_genex
"$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_SKIP_WARNINGS_ARE_ERRORS>>>") "$<NOT:$<BOOL:$<TARGET_PROPERTY:QT_SKIP_WARNINGS_ARE_ERRORS>>>")
# Apprently qmake only adds -Werror to CXX and OBJCXX files, not C files. We have to do the # Apparently qmake only adds -Werror to CXX and OBJCXX files, not C files. We have to do the
# same otherwise MinGW builds break when building 3rdparty\md4c\md4c.c (and probably on other # same otherwise MinGW builds break when building 3rdparty\md4c\md4c.c (and probably on other
# platforms too). # platforms too).
set(cxx_only_genex "$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>") set(cxx_only_genex "$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>")

View File

@ -927,7 +927,7 @@ the different base name for the module info variables.")
set("${result}_build_interface_qpa_include_dir" set("${result}_build_interface_qpa_include_dir"
"${repo_build_interface_include_dir}/${${result}_qpa_include_dir}") "${repo_build_interface_include_dir}/${${result}_qpa_include_dir}")
# Module install interface direcotries # Module install interface directories
set(repo_install_interface_include_dir "${INSTALL_INCLUDEDIR}") set(repo_install_interface_include_dir "${INSTALL_INCLUDEDIR}")
set("${result}_install_interface_include_dir" set("${result}_install_interface_include_dir"
"${repo_install_interface_include_dir}/${${result}_include_name}") "${repo_install_interface_include_dir}/${${result}_include_name}")

View File

@ -26,7 +26,7 @@ function(qt_create_nolink_target target dependee_target)
add_library("${nolink_target}" INTERFACE) add_library("${nolink_target}" INTERFACE)
set(prefixed_nolink_target "${target}_nolink") set(prefixed_nolink_target "${target}_nolink")
# Whe configuring an example with qmake, if QtGui is built with Vulkan support but the # When configuring an example with qmake, if QtGui is built with Vulkan support but the
# user's machine where Qt is installed doesn't have Vulkan, qmake doesn't fail saying # user's machine where Qt is installed doesn't have Vulkan, qmake doesn't fail saying
# that vulkan is not installed. Instead it silently configures and just doesn't add # that vulkan is not installed. Instead it silently configures and just doesn't add
# the include headers. # the include headers.

View File

@ -227,7 +227,7 @@ function(qt_internal_create_module_depends_file target)
foreach(dep ${target_deps}) foreach(dep ${target_deps})
if(NOT dep MATCHES ".+Private$" AND if(NOT dep MATCHES ".+Private$" AND
dep MATCHES "${INSTALL_CMAKE_NAMESPACE}(.+)") dep MATCHES "${INSTALL_CMAKE_NAMESPACE}(.+)")
# target_deps cointains elements that are a pair of target name and version, # target_deps contains elements that are a pair of target name and version,
# e.g. 'Core\;6.2' # e.g. 'Core\;6.2'
# After the extracting from the target_deps list, the element becomes a list itself, # After the extracting from the target_deps list, the element becomes a list itself,
# because it loses escape symbol before the semicolon, so ${CMAKE_MATCH_1} is the list: # because it loses escape symbol before the semicolon, so ${CMAKE_MATCH_1} is the list:
@ -764,7 +764,7 @@ function(qt_internal_create_config_file_for_standalone_tests)
return() return()
endif() endif()
# Ceate a Config file that calls find_package on the modules that were built as part # Create a Config file that calls find_package on the modules that were built as part
# of the current repo. This is used for standalone tests. # of the current repo. This is used for standalone tests.
qt_internal_get_standalone_tests_config_file_name(tests_config_file_name) qt_internal_get_standalone_tests_config_file_name(tests_config_file_name)
configure_file( configure_file(

View File

@ -8,7 +8,7 @@
# because CMake's handling of empty list elements is a cruel joke. # because CMake's handling of empty list elements is a cruel joke.
# For CMake < 3.18 the function qt_watch_current_list_dir must know about the finalizer. # For CMake < 3.18 the function qt_watch_current_list_dir must know about the finalizer.
# #
# When using CMake 3.19 or higher, no more INGORE parameters are passed. Instead we # When using CMake 3.19 or higher, no more IGNORE parameters are passed. Instead we
# use cmake_language(DEFER CALL) and pass arguments as usual. # use cmake_language(DEFER CALL) and pass arguments as usual.
# qt_watch_current_list_dir also doesn't need to know about the finalizer # qt_watch_current_list_dir also doesn't need to know about the finalizer
function(qt_add_list_file_finalizer func) function(qt_add_list_file_finalizer func)

View File

@ -480,7 +480,7 @@ endif()
# INTERFACE libraries don't have IMPORTED_LOCATION-like properties. # INTERFACE libraries don't have IMPORTED_LOCATION-like properties.
# OBJECT libraries have properties like IMPORTED_OBJECTS instead. # OBJECT libraries have properties like IMPORTED_OBJECTS instead.
# Skip the rest of the procesing for those. # Skip the rest of the processing for those.
if(target_type STREQUAL "INTERFACE_LIBRARY" OR target_type STREQUAL "OBJECT_LIBRARY") if(target_type STREQUAL "INTERFACE_LIBRARY" OR target_type STREQUAL "OBJECT_LIBRARY")
continue() continue()
endif() endif()
@ -664,12 +664,12 @@ endfunction()
# #
# MSVC generates 2 types of pdb files: # MSVC generates 2 types of pdb files:
# - compile-time generated pdb files (compile flag /Zi + /Fd<pdb_name>) # - compile-time generated pdb files (compile flag /Zi + /Fd<pdb_name>)
# - link-time genereated pdb files (link flag /debug + /PDB:<pdb_name>) # - link-time generated pdb files (link flag /debug + /PDB:<pdb_name>)
# #
# CMake allows changing the names of each of those pdb file types by setting # CMake allows changing the names of each of those pdb file types by setting
# the COMPILE_PDB_NAME_<CONFIG> and PDB_NAME_<CONFIG> properties. If they are # the COMPILE_PDB_NAME_<CONFIG> and PDB_NAME_<CONFIG> properties. If they are
# left empty, CMake will compute the default names itself (or rather in certain cases # left empty, CMake will compute the default names itself (or rather in certain cases
# leave it up to te compiler), without actually setting the property values. # leave it up to the compiler), without actually setting the property values.
# #
# For installation purposes, CMake only provides a generator expression to the # For installation purposes, CMake only provides a generator expression to the
# link time pdb file path, not the compile path one, which means we have to compute the # link time pdb file path, not the compile path one, which means we have to compute the

View File

@ -187,7 +187,7 @@ endfunction()
# to ON. This is helpful if you want to use internal CMake tools within tests, like memory or # to ON. This is helpful if you want to use internal CMake tools within tests, like memory or
# sanitizer checks. See https://cmake.org/cmake/help/v3.19/manual/ctest.1.html#ctest-memcheck-step # sanitizer checks. See https://cmake.org/cmake/help/v3.19/manual/ctest.1.html#ctest-memcheck-step
# Arguments: # Arguments:
# BUILTIN_TESTDATA the option forces adding the provded TESTDATA to resources. # BUILTIN_TESTDATA the option forces adding the provided TESTDATA to resources.
function(qt_internal_add_test name) function(qt_internal_add_test name)
# EXCEPTIONS is a noop as they are enabled by default. # EXCEPTIONS is a noop as they are enabled by default.
set(optional_args set(optional_args
@ -646,7 +646,7 @@ endfunction()
# This function creates an executable for use as a helper program with tests. Some # This function creates an executable for use as a helper program with tests. Some
# tests launch separate programs to test certain input/output behavior. # tests launch separate programs to test certain input/output behavior.
# Specify OVERRIDE_OUTPUT_DIRECTORY if you dont' want to place the helper in the parent directory, # Specify OVERRIDE_OUTPUT_DIRECTORY if you don't want to place the helper in the parent directory,
# in which case you should specify OUTPUT_DIRECTORY "/foo/bar" manually. # in which case you should specify OUTPUT_DIRECTORY "/foo/bar" manually.
function(qt_internal_add_test_helper name) function(qt_internal_add_test_helper name)

View File

@ -30,7 +30,7 @@
# The argument accepts 'Bootstrap' or 'None' values. If the argument value is set to # The argument accepts 'Bootstrap' or 'None' values. If the argument value is set to
# 'Bootstrap' the Qt::Bootstrap library is linked to the executable instead of Qt::Core. # 'Bootstrap' the Qt::Bootstrap library is linked to the executable instead of Qt::Core.
# The 'None' value points that core library is not necessary and avoids linking neither # The 'None' value points that core library is not necessary and avoids linking neither
# Qt::Core or Qt::Bootstrap libraries. Otherwise the Qt::Core library will be publically # Qt::Core or Qt::Bootstrap libraries. Otherwise the Qt::Core library will be publicly
# linked to the executable target by default. # linked to the executable target by default.
function(qt_internal_add_tool target_name) function(qt_internal_add_tool target_name)
qt_tool_target_to_name(name ${target_name}) qt_tool_target_to_name(name ${target_name})

View File

@ -132,7 +132,7 @@ Compiling for a target architecture that's different than the host requires one
host. This "host build" is needed because the process of building Qt involves the compilation of host. This "host build" is needed because the process of building Qt involves the compilation of
intermediate code generator tools, that in turn are called to produce source code that needs to be intermediate code generator tools, that in turn are called to produce source code that needs to be
compiled into the final libraries. These tools are built using Qt itself and they need to run on the compiled into the final libraries. These tools are built using Qt itself and they need to run on the
machine you're building on, regardless of the architecure you are targeting. machine you're building on, regardless of the architecture you are targeting.
Build Qt regularly for your host system and install it into a directory of your choice using the Build Qt regularly for your host system and install it into a directory of your choice using the
``CMAKE_INSTALL_PREFIX`` variable. You are free to disable the build of tests and examples by ``CMAKE_INSTALL_PREFIX`` variable. You are free to disable the build of tests and examples by

View File

@ -38,7 +38,7 @@ if(__qt_chainload_toolchain_file)
"${__qt_chainload_toolchain_file}" REALPATH) "${__qt_chainload_toolchain_file}" REALPATH)
if(__qt_chainload_toolchain_file_real_path STREQUAL CMAKE_CURRENT_LIST_FILE) if(__qt_chainload_toolchain_file_real_path STREQUAL CMAKE_CURRENT_LIST_FILE)
message(FATAL_ERROR message(FATAL_ERROR
"Woah, the Qt toolchain file tried to include itself recusively! '${__qt_chainload_toolchain_file}' " "Woah, the Qt toolchain file tried to include itself recursively! '${__qt_chainload_toolchain_file}' "
"Make sure to remove qtbase/CMakeCache.txt and reconfigure qtbase with 'cmake' " "Make sure to remove qtbase/CMakeCache.txt and reconfigure qtbase with 'cmake' "
"rather than 'qt-cmake', and then you can reconfigure your own project." "rather than 'qt-cmake', and then you can reconfigure your own project."
) )

View File

@ -1167,7 +1167,7 @@ qt_configure_add_report_entry(
# special case begin # special case begin
# qt_configure_add_report_entry( # qt_configure_add_report_entry(
# TYPE ERROR # TYPE ERROR
# MESSAGE "Debug build wihtout Release build is not currently supported on ios see QTBUG-71990. Use -debug-and-release." # 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 # CONDITION IOS AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
# ) # )
# special case end # special case end

View File

@ -919,10 +919,10 @@ function(_qt_internal_get_ios_bundle_identifier_prefix out_var)
OUTPUT_VARIABLE prefix OUTPUT_VARIABLE prefix
ERROR_VARIABLE prefix_error) ERROR_VARIABLE prefix_error)
if(prefix AND NOT prefix_error) if(prefix AND NOT prefix_error)
message(DEBUG "Successfully extracted the default bundle indentifier prefix.") message(DEBUG "Successfully extracted the default bundle identifier prefix.")
string(STRIP "${prefix}" prefix) string(STRIP "${prefix}" prefix)
else() else()
message(DEBUG "Failed to extract the default bundle indentifier prefix.") message(DEBUG "Failed to extract the default bundle identifier prefix.")
endif() endif()
if(prefix AND NOT prefix_error) if(prefix AND NOT prefix_error)

View File

@ -21,7 +21,7 @@ def _parse_commandline():
) )
parser.add_argument( parser.add_argument(
"binary_directory", "binary_directory",
metavar="<CMake build direcotry>", metavar="<CMake build directory>",
type=str, type=str,
help="The CMake build directory (might be empty)", help="The CMake build directory (might be empty)",
) )

View File

@ -5027,7 +5027,7 @@ def main() -> None:
cmake_api_version = args.api_version cmake_api_version = args.api_version
else: else:
# Otherwise detect the api version in the old CMakeLists.txt # Otherwise detect the api version in the old CMakeLists.txt
# if it exsists. # if it exists.
detected_cmake_api_version = detect_cmake_api_version_used_in_file_content( detected_cmake_api_version = detect_cmake_api_version_used_in_file_content(
file_relative_path file_relative_path
) )