mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
Tests: Fix RunCMake.CMP0022 tll case for Debug configuration
The `CMP0022-WARN-tll` case overrides legacy properties set by `target_link_libraries` so that we can verify that the policy warning is emitted. When building in the Debug configuration, the `_DEBUG` variant of the legacy property is set/checked too. Fix the test case to override both variants. Previously it only passed because `cmComputeTargetDepends::AddInterfaceDepends` always evaluated dependencies with the "" configuration.
This commit is contained in:
parent
3f25f873f8
commit
70c6557285
@ -4,13 +4,13 @@ CMake Warning \(dev\) in CMakeLists.txt:
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs from
|
||||
its LINK_INTERFACE_LIBRARIES properties.
|
||||
its LINK_INTERFACE_LIBRARIES(_DEBUG)? properties.
|
||||
|
||||
INTERFACE_LINK_LIBRARIES:
|
||||
|
||||
foo
|
||||
|
||||
LINK_INTERFACE_LIBRARIES:
|
||||
LINK_INTERFACE_LIBRARIES(_DEBUG)?:
|
||||
|
||||
bat
|
||||
|
||||
|
@ -5,7 +5,9 @@ add_library(foo SHARED empty_vs6_1.cpp)
|
||||
add_library(bar SHARED empty_vs6_2.cpp)
|
||||
add_library(bat SHARED empty_vs6_3.cpp)
|
||||
target_link_libraries(bar LINK_PUBLIC foo)
|
||||
# Replace the compatibility values set by target_link_libraries
|
||||
set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES bat)
|
||||
set_property(TARGET bar PROPERTY LINK_INTERFACE_LIBRARIES_DEBUG bat)
|
||||
|
||||
add_library(user SHARED empty.cpp)
|
||||
target_link_libraries(user bar)
|
||||
|
Loading…
Reference in New Issue
Block a user