mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06: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
14 lines
368 B
CMake
14 lines
368 B
CMake
project(test-CMP0199-NEW C)
|
|
|
|
cmake_policy(SET CMP0199 NEW)
|
|
|
|
# Note: Under CMP0199 OLD, CMake (incorrectly) selects the RELEASE
|
|
# configuration for the mapped config test. The CMP0199-NEW+CMP0200-NEW tests
|
|
# the combination of fixes.
|
|
cmake_policy(SET CMP0200 OLD)
|
|
|
|
include(CMP0199-cases.cmake)
|
|
|
|
do_mapped_config_test(EXPECT_RELEASE)
|
|
do_unique_config_test(EXPECT_DEBUG)
|