mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-05 14:49:39 -06:00
Since commitb8626261e9(Precompile headers: Add methods to generate PCH sources, 2019-07-13, v3.16.0-rc1~182^2~4) we look up source files for a target using an upper-case configuration even though an original-case name is sufficient. Since commit36ded610af(PCH: Generate sources during Compute step, 2019-10-05, v3.16.0-rc1~2^2) the source file lookup is the first time we compute many on-demand structures that depend on the configuration name. This caused the `$<CONFIG>` generator expression to evaluate to the upper-case configuration name in some cases where we used original-case before. Fix this by switching the source file lookup to the original-case config name. Add a test covering the symptom that led to the discovery of this problem. Fixes: #20517
7 lines
233 B
CMake
7 lines
233 B
CMake
cmake_policy(VERSION 3.15)
|
|
enable_language(C)
|
|
add_library(iface INTERFACE)
|
|
target_link_libraries(iface INTERFACE "config::iface-$<CONFIG>")
|
|
add_library(impl empty.c)
|
|
target_link_libraries(impl PRIVATE "config::impl-$<CONFIG>" iface)
|