mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-09 18:09:02 -05:00
cmVisualStudio10TargetGenerator: issue warning when adding static C# lib
This commit is contained in:
@@ -333,6 +333,14 @@ void cmVisualStudio10TargetGenerator::Generate()
|
||||
this->ProjectType = vcxproj;
|
||||
this->Managed = false;
|
||||
} else if (this->ProjectFileExtension == ".csproj") {
|
||||
if (this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) {
|
||||
std::string message = "The C# target \"" +
|
||||
this->GeneratorTarget->GetName() +
|
||||
"\" is of type STATIC_LIBRARY. This is discouraged (and may be "
|
||||
"disabled in future). Make it a SHARED library instead.";
|
||||
this->Makefile->IssueMessage(cmake::MessageType::DEPRECATION_WARNING,
|
||||
message);
|
||||
}
|
||||
this->ProjectType = csproj;
|
||||
this->Managed = true;
|
||||
}
|
||||
|
||||
3
Tests/RunCMake/VS10Project/VsCSharpCustomTags-stderr.txt
Normal file
3
Tests/RunCMake/VS10Project/VsCSharpCustomTags-stderr.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
^CMake Deprecation Warning in CMakeLists.txt:
|
||||
The C# target "foo" is of type STATIC_LIBRARY. This is discouraged \(and
|
||||
may be disabled in future\). Make it a SHARED library instead.$
|
||||
@@ -0,0 +1,8 @@
|
||||
^CMake Deprecation Warning in CMakeLists.txt:
|
||||
The C# target "foo2" is of type STATIC_LIBRARY. This is discouraged \(and
|
||||
may be disabled in future\). Make it a SHARED library instead.
|
||||
|
||||
|
||||
CMake Deprecation Warning in CMakeLists.txt:
|
||||
The C# target "foo" is of type STATIC_LIBRARY. This is discouraged \(and
|
||||
may be disabled in future\). Make it a SHARED library instead.$
|
||||
Reference in New Issue
Block a user