mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Adds support for "symbolic" components, which represent feature-level capabilities of a package that do not correspond to actual build targets. These are modeled as pseudo-targets, using the INTERFACE type as a base, and can be queried via: get_target_property(... <tgt> "SYMBOLIC") This enables consumers to declare requirements on optional features (e.g., SSL support) even when they do not map to concrete targets. Fixes: #27187
9 lines
354 B
CMake
9 lines
354 B
CMake
add_library(TestSymbolicInterfaceLib INTERFACE SYMBOLIC)
|
|
|
|
get_target_property(IS_SYMBOLIC TestSymbolicInterfaceLib "SYMBOLIC")
|
|
|
|
if("${IS_SYMBOLIC}" STREQUAL "FALSE")
|
|
string(APPEND RunCMake_TEST_FAILED "Target: \"TestSymbolicInterfaceLib\" does not have the SYMBOLIC property")
|
|
set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
|
|
endif()
|