mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Extend header set verification to support Objective-C and Objective-C++.
The supported-language table grows to {"C", "CXX", "OBJC", "OBJCXX"}
and the lattice join is updated so OBJCXX is chosen when both CXX and
OBJC sources are present. GenerateStubForLanguage emits .m/.mm stubs
and the relevant OBJC/OBJCXX standard properties are copied to the
verification target.
Add OBJC/OBJCXX test cases conditioned on CMake_TEST_OBJC, isolated in
dedicated project files to avoid affecting language inference for
unrelated targets. Update property documentation and add a release note.
13 lines
534 B
CMake
13 lines
534 B
CMake
cmake_policy(SET CMP0209 NEW)
|
|
|
|
enable_language(C CXX OBJC OBJCXX)
|
|
|
|
add_library(lang_test_objc STATIC lib.m)
|
|
target_sources(lang_test_objc INTERFACE FILE_SET HEADERS FILES lang_test.h)
|
|
target_compile_definitions(lang_test_objc INTERFACE EXPECT_OBJC)
|
|
|
|
# OBJC + OBJCXX sources -> lattice promotes to OBJCXX for unlanguaged headers
|
|
add_library(lang_test_objcxx STATIC lib.m lib.mm)
|
|
target_sources(lang_test_objcxx INTERFACE FILE_SET HEADERS FILES lang_test.h)
|
|
target_compile_definitions(lang_test_objcxx INTERFACE EXPECT_CXX EXPECT_OBJC)
|