| 370 | ".CSharp.targets" |
| 371 | |
| 372 | void cmVisualStudio10TargetGenerator::Generate() |
| 373 | { |
| 374 | if (this->GeneratorTarget->IsSynthetic()) { |
| 375 | this->GeneratorTarget->Makefile->IssueMessage( |
| 376 | MessageType::FATAL_ERROR, |
| 377 | cmStrCat("Target \"", this->GeneratorTarget->GetName(), |
| 378 | "\" contains C++ modules intended for BMI-only compilation. " |
| 379 | "This is not yet supported by the Visual Studio generator.")); |
| 380 | return; |
| 381 | } |
| 382 | |
| 383 | for (std::string const& config : this->Configurations) { |
| 384 | this->GeneratorTarget->CheckCxxModuleStatus(config); |
| 385 | } |
| 386 | |
| 387 | this->ProjectType = computeProjectType(this->GeneratorTarget); |
| 388 | this->Managed = this->ProjectType == VsProjectType::csproj; |
| 389 | std::string const ProjectFileExtension = |
| 390 | computeProjectFileExtension(this->ProjectType); |
| 391 | |
| 392 | if (this->ProjectType == VsProjectType::csproj && |
| 393 | this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY) { |
| 394 | std::string message = |
| 395 | cmStrCat("The C# target \"", this->GeneratorTarget->GetName(), |
| 396 | "\" is of type STATIC_LIBRARY. This is discouraged (and may be " |
| 397 | "disabled in future). Make it a SHARED library instead."); |
| 398 | this->Makefile->IssueMessage(MessageType::DEPRECATION_WARNING, message); |
| 399 | } |
| 400 | |
| 401 | if (this->Android && |
| 402 | this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE && |
| 403 | !this->GeneratorTarget->Target->IsAndroidGuiExecutable()) { |
| 404 | this->GlobalGenerator->AddAndroidExecutableWarning(this->Name); |
| 405 | } |
| 406 | |
| 407 | // Tell the global generator the name of the project file |
| 408 | this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME", |
| 409 | this->Name); |
| 410 | this->GeneratorTarget->Target->SetProperty("GENERATOR_FILE_NAME_EXT", |
| 411 | ProjectFileExtension); |
| 412 | this->DotNetHintReferences.clear(); |
| 413 | this->AdditionalUsingDirectories.clear(); |
| 414 | if (this->GeneratorTarget->GetType() <= cmStateEnums::OBJECT_LIBRARY) { |
| 415 | if (!this->ComputeClOptions()) { |
| 416 | return; |
| 417 | } |
| 418 | if (!this->ComputeRcOptions()) { |
| 419 | return; |
| 420 | } |
| 421 | if (!this->ComputeCudaOptions()) { |
| 422 | return; |
| 423 | } |
| 424 | if (!this->ComputeCudaLinkOptions()) { |
| 425 | return; |
| 426 | } |
| 427 | if (!this->ComputeMarmasmOptions()) { |
| 428 | return; |
| 429 | } |
nothing calls this directly
no test coverage detected