diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-03-15 17:37:11 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-03-17 15:15:06 +0100 |
commit | 8adacba3e6970d784108645d5c0a70e5b9c1151e (patch) | |
tree | 40055c9e057c1f4b24fb37f05cbed542f8365b64 /cmake | |
parent | 74bef86da8b63996ca6947d81e82b667ac1eb0b2 (diff) |
Add VERBATIM option to add_custom_command calls
Use VERBATIM option to prepare the correct command line for the
add_custom_command. This especially sensitive when using build
directories with names containing special symbols, that cannot be
handled by shell correctly.
Change-Id: I51d7041cb806411135fd59bf6273c04a3c695443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtFlagHandlingHelpers.cmake | 2 | ||||
-rw-r--r-- | cmake/QtFrameworkHelpers.cmake | 3 | ||||
-rw-r--r-- | cmake/QtLalrHelpers.cmake | 1 | ||||
-rw-r--r-- | cmake/QtSeparateDebugInfo.cmake | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index a4a989ee60..00c69b0983 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -37,7 +37,7 @@ function(qt_internal_add_linker_version_script target) BYPRODUCTS "${outfile}" DEPENDS "${infile}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generating version linker script" - ) + VERBATIM) target_link_options("${target}" PRIVATE "-Wl,--version-script,${outfile}") endif() endfunction() diff --git a/cmake/QtFrameworkHelpers.cmake b/cmake/QtFrameworkHelpers.cmake index 8c6bf23d51..86661ad4f7 100644 --- a/cmake/QtFrameworkHelpers.cmake +++ b/cmake/QtFrameworkHelpers.cmake @@ -86,7 +86,8 @@ function(qt_copy_framework_headers target) OUTPUT ${out_file_path} DEPENDS ${in_file_path} COMMAND ${CMAKE_COMMAND} -E make_directory "${fw_output_header_dir}" - COMMAND ${CMAKE_COMMAND} -E copy "${in_file_path}" "${fw_output_header_dir}") + COMMAND ${CMAKE_COMMAND} -E copy "${in_file_path}" "${fw_output_header_dir}" + VERBATIM) list(APPEND out_files ${out_file_path}) endforeach() diff --git a/cmake/QtLalrHelpers.cmake b/cmake/QtLalrHelpers.cmake index 7c147b0597..cdc24e5ac2 100644 --- a/cmake/QtLalrHelpers.cmake +++ b/cmake/QtLalrHelpers.cmake @@ -57,6 +57,7 @@ function(qt_process_qlalr consuming_target input_file_list flags) COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr ${flags} ${relative_input_file} DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr MAIN_DEPENDENCY ${input_file} + VERBATIM ) target_sources(${consuming_target} PRIVATE ${cpp_file} ${impl_file}) endforeach() diff --git a/cmake/QtSeparateDebugInfo.cmake b/cmake/QtSeparateDebugInfo.cmake index 00ac4519fe..55c445ba98 100644 --- a/cmake/QtSeparateDebugInfo.cmake +++ b/cmake/QtSeparateDebugInfo.cmake @@ -115,5 +115,5 @@ function(qt_enable_separate_debug_info target installDestination) TARGET ${target} POST_BUILD ${commands} - ) + VERBATIM) endfunction() |