summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-29 15:21:13 (GMT)
committerBrad King <brad.king@kitware.com>2021-07-29 15:38:58 (GMT)
commit53aabe9817dfad76869c41c2eeb46fb874bf188b (patch)
tree6498ef905e8c11335273dbf4c60ad0981f481c87 /Source/cmVisualStudio10TargetGenerator.cxx
parent516ac348c7b14d8221e3f579454a8356e62d28d3 (diff)
downloadCMake-53aabe9817dfad76869c41c2eeb46fb874bf188b.zip
CMake-53aabe9817dfad76869c41c2eeb46fb874bf188b.tar.gz
CMake-53aabe9817dfad76869c41c2eeb46fb874bf188b.tar.bz2
VS: Fix assertion failure on INCLUDE_DIRECTORIES in INTERFACE libraries
Since commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the VS generator may process INTERFACE libraries. Avoid code paths in the generator that process include directories because they should not be used by INTERFACE libraries since they do not compile anything. Fixes: #22494
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 11a8b1f..bda2f91 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -4093,6 +4093,9 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions(
if (this->ProjectType == csproj) {
return;
}
+ if (this->GeneratorTarget->GetType() > cmStateEnums::UTILITY) {
+ return;
+ }
// This processes *any* of the .idl files specified in the project's file
// list (and passed as the item metadata %(Filename) expressing the rule