mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-10 07:40:03 -06:00
The historic implementation of `$<CONFIG>` had some errors that could result in multiple configurations matching. First, it always considered the configuration of the consuming target, even if a consumed imported target selected a different configuration. Second, it matched the entire list of `MAP_IMPORTED_CONFIG_<CONFIG>` configurations, even if none of those were actually selected. The latter in particular is redundant at best, as we also consider the selected configuration of an imported target, which is the correct configuration to match for imported targets. Refactor the implementation so that only one configuration is considered. Fixes: #23660 Issue: #27022
35 lines
507 B
C
35 lines
507 B
C
#ifdef EXPECT_DEBUG
|
|
# ifndef DEBUG
|
|
# error DEBUG should be defined
|
|
# endif
|
|
#else
|
|
# ifdef DEBUG
|
|
# error DEBUG should not be defined
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef EXPECT_RELEASE
|
|
# ifndef RELEASE
|
|
# error RELEASE should be defined
|
|
# endif
|
|
#else
|
|
# ifdef RELEASE
|
|
# error RELEASE should not be defined
|
|
# endif
|
|
#endif
|
|
|
|
#ifdef EXPECT_TEST
|
|
# ifndef TEST
|
|
# error TEST should be defined
|
|
# endif
|
|
#else
|
|
# ifdef TEST
|
|
# error TEST should not be defined
|
|
# endif
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|