Commit e9b8d6fd authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'vs-iface-include-dirs' into release-3.21

53aabe98

 VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6411
parents d14a1ae8 53aabe98
Pipeline #240637 failed with stages
...@@ -4093,6 +4093,9 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions( ...@@ -4093,6 +4093,9 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions(
if (this->ProjectType == csproj) { if (this->ProjectType == csproj) {
return; return;
} }
if (this->GeneratorTarget->GetType() > cmStateEnums::UTILITY) {
return;
}
// This processes *any* of the .idl files specified in the project's file // This processes *any* of the .idl files specified in the project's file
// list (and passed as the item metadata %(Filename) expressing the rule // list (and passed as the item metadata %(Filename) expressing the rule
......
cmake_policy(SET CMP0076 NEW)
include_directories(Inc1 Inc2)
add_library(iface INTERFACE)
target_sources(iface PRIVATE iface.c)
# Ensure the INCLUDE_DIRECTORIES property is populated.
# Since interface libraries do not actually compile anything, this should be ignored.
set_property(TARGET iface APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Inc3 ${CMAKE_CURRENT_SOURCE_DIR}/Inc4)
...@@ -34,3 +34,4 @@ run_WithSources(ConfigSources "build1:iface") ...@@ -34,3 +34,4 @@ run_WithSources(ConfigSources "build1:iface")
run_WithSources(EmptySources "build1:iface" "build2:iface2,merge") run_WithSources(EmptySources "build1:iface" "build2:iface2,merge")
run_WithSources(ExcludeFromAll "build1" "build2:iface" "build3:iface2,merge") run_WithSources(ExcludeFromAll "build1" "build2:iface" "build3:iface2,merge")
run_WithSources(PublicSources "build1" "build2:iface" "build3:iface2,merge") run_WithSources(PublicSources "build1" "build2:iface" "build3:iface2,merge")
run_WithSources(IncludeDirectories "build1:iface")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment