summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-23 14:55:12 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-23 14:58:42 (GMT)
commitd004d8c59a6daa5b27c6e737b687793f51557704 (patch)
tree39e8443bee8953fdae769bc64738a5a4486b123a /Source/cmVisualStudio10TargetGenerator.cxx
parentfd02538974dd952a8639d371c2c0067d30d5469a (diff)
downloadCMake-d004d8c59a6daa5b27c6e737b687793f51557704.zip
CMake-d004d8c59a6daa5b27c6e737b687793f51557704.tar.gz
CMake-d004d8c59a6daa5b27c6e737b687793f51557704.tar.bz2
VS: Fix crash on CSharp sources in a custom target
The target generator does not compute ClOptions for custom targets, so we should not use them either. Fixes: #18377, #18485
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 16eca96..d3ea24c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1130,6 +1130,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValuesManaged(
Elem& e1, std::string const& config)
{
+ if (this->GeneratorTarget->GetType() > cmStateEnums::OBJECT_LIBRARY) {
+ return;
+ }
+
cmGlobalVisualStudio10Generator* gg = this->GlobalGenerator;
Options& o = *(this->ClOptions[config]);