summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-03-29 11:47:41 +0200
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-04-03 12:41:14 +0200
commit936c3bd224c002c8c3d4ac4e101283f81385f3b6 (patch)
tree2708fae3b1cdbc757861e21f28005f25b7132990
parentc763e743552f9d7d87dec0f433ef9c22d0764b37 (diff)
Add NO_UNITY_BUILD support to qt_internal_add_app
Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: Iefeb3b846cd889d6ae0aa786f9ae23fbfc811b64 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtAppHelpers.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake
index 01ca0a5ca2..cfc3724558 100644
--- a/cmake/QtAppHelpers.cmake
+++ b/cmake/QtAppHelpers.cmake
@@ -5,7 +5,7 @@
# Such projects had a load(qt_app) command.
function(qt_internal_add_app target)
cmake_parse_arguments(PARSE_ARGV 1 arg
- "NO_INSTALL;INSTALL_VERSIONED_LINK;EXCEPTIONS"
+ "NO_INSTALL;INSTALL_VERSIONED_LINK;EXCEPTIONS;NO_UNITY_BUILD"
"${__default_target_info_args};INSTALL_DIR"
"${__default_private_args};PUBLIC_LIBRARIES"
)
@@ -37,6 +37,12 @@ function(qt_internal_add_app target)
qt_internal_library_deprecation_level(deprecation_define)
+ if(arg_NO_UNITY_BUILD)
+ set(arg_NO_UNITY_BUILD "NO_UNITY_BUILD")
+ else()
+ set(arg_NO_UNITY_BUILD "")
+ endif()
+
qt_internal_add_executable("${target}"
QT_APP
DELAY_RC
@@ -44,8 +50,10 @@ function(qt_internal_add_app target)
OUTPUT_DIRECTORY "${output_directory}"
${exceptions}
${no_install}
+ ${arg_NO_UNITY_BUILD}
${forward_install_dir}
SOURCES ${arg_SOURCES}
+ NO_UNITY_BUILD_SOURCES ${arg_NO_UNITY_BUILD_SOURCES}
INCLUDE_DIRECTORIES
${arg_INCLUDE_DIRECTORIES}
DEFINES