summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qdebug/CMakeLists.txt
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-04-13 14:10:16 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-04-13 14:36:26 +0200
commit06499383ca1628c1ceeb4b2b786299093372de1d (patch)
tree384388bca6be4955e9d316b89c771da9402d37b5 /tests/auto/corelib/io/qdebug/CMakeLists.txt
parentd953bc76bb67b6e24936af5ab04887e937d5d5c3 (diff)
Use LANGUAGE OBJCXX rather than COMPILE_FLAGS "-x objective-c++"
We sometimes use Objective-C++ code in files with a .cpp extension, to avoid the churn of adding a foo_mac.mm file. Instead of manually telling the compiler to build these files in Objective-C++ mode, we use CMake's intended mechanism, which means genex constructs such as $<$<COMPILE_LANGUAGE:OBJCXX> will work for these files as well. Pick-to: 6.5 6.2 Change-Id: If295c3f34f6bee9f4d9f877f519c9c7770665fee Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qdebug/CMakeLists.txt')
-rw-r--r--tests/auto/corelib/io/qdebug/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qdebug/CMakeLists.txt b/tests/auto/corelib/io/qdebug/CMakeLists.txt
index cef57a2186..c9fd9c6df8 100644
--- a/tests/auto/corelib/io/qdebug/CMakeLists.txt
+++ b/tests/auto/corelib/io/qdebug/CMakeLists.txt
@@ -13,5 +13,5 @@ qt_internal_add_test(tst_qdebug
)
if (APPLE)
- target_compile_options(tst_qdebug PRIVATE -x objective-c++)
+ set_source_files_properties(tst_qdebug.cpp PROPERTIES LANGUAGE OBJCXX)
endif()