mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-09 23:44:00 +03:00
Create a brand new implementation of `cmTarget::GetMappedConfig` which prioritized a target's `IMPORTED_CONFIGURATIONS` as the 'source of truth' for what configurations are available. In particular, this means that configuration selection when `IMPORTED_CONFIGURATIONS` is set does not depend on the library type in any manner. The fallback logic also uses a more consistent 'usability' criteria that should result in more consistent configuration selection, particularly for `INTERFACE` targets. The previous implementation is retained as a separate method for users requesting the OLD behavior. Fixes: #27022
12 lines
277 B
CMake
12 lines
277 B
CMake
project(test-CMP0200-WARN C)
|
|
|
|
set(CMAKE_POLICY_WARNING_CMP0200 ON)
|
|
|
|
add_library(lib_test INTERFACE IMPORTED)
|
|
set_target_properties(lib_test PROPERTIES
|
|
IMPORTED_CONFIGURATIONS "DOG;CAT"
|
|
)
|
|
|
|
add_executable(exe_test configtest.c)
|
|
target_link_libraries(exe_test PRIVATE lib_test)
|