mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-06 06:38:37 -06:00
Merge topic 'vs-csharp-in-custom-target'
d004d8c59a VS: Fix crash on CSharp sources in a custom target
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2515
This commit is contained in:
@@ -1122,6 +1122,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]);
|
||||
|
||||
@@ -8,3 +8,6 @@ add_library(lib2 SHARED lib2.cs)
|
||||
add_executable(CSharpOnly csharponly.cs)
|
||||
|
||||
target_link_libraries(CSharpOnly lib1 lib2)
|
||||
|
||||
add_custom_target(CSharpCustom SOURCES empty.cs)
|
||||
add_custom_target(custom.cs DEPENDS empty.txt)
|
||||
|
||||
0
Tests/CSharpOnly/empty.cs
Normal file
0
Tests/CSharpOnly/empty.cs
Normal file
0
Tests/CSharpOnly/empty.txt
Normal file
0
Tests/CSharpOnly/empty.txt
Normal file
Reference in New Issue
Block a user