| 6080 | } |
| 6081 | |
| 6082 | void cmVisualStudio10TargetGenerator::UpdateCache() |
| 6083 | { |
| 6084 | std::vector<std::string> packageReferences; |
| 6085 | |
| 6086 | if (this->GeneratorTarget->IsDotNetSdkTarget() || |
| 6087 | this->GeneratorTarget->HasPackageReferences()) { |
| 6088 | // Store a cache entry that later determines, if a package restore is |
| 6089 | // required. |
| 6090 | this->GeneratorTarget->Makefile->AddCacheDefinition( |
| 6091 | cmStrCat(this->GeneratorTarget->GetName(), |
| 6092 | "_REQUIRES_VS_PACKAGE_RESTORE"), |
| 6093 | "ON", "Value Computed by CMake", cmStateEnums::STATIC); |
| 6094 | } else { |
| 6095 | // If there are any dependencies that require package restore, inherit the |
| 6096 | // cache variable. |
| 6097 | cmGlobalGenerator::TargetDependSet const& unordered = |
| 6098 | this->GlobalGenerator->GetTargetDirectDepends(this->GeneratorTarget); |
| 6099 | using OrderedTargetDependSet = |
| 6100 | cmGlobalVisualStudioGenerator::OrderedTargetDependSet; |
| 6101 | OrderedTargetDependSet depends(unordered, CMAKE_CHECK_BUILD_SYSTEM_TARGET); |
| 6102 | |
| 6103 | for (cmGeneratorTarget const* dt : depends) { |
| 6104 | if (dt->IsDotNetSdkTarget() || dt->HasPackageReferences()) { |
| 6105 | this->GeneratorTarget->Makefile->AddCacheDefinition( |
| 6106 | cmStrCat(this->GeneratorTarget->GetName(), |
| 6107 | "_REQUIRES_VS_PACKAGE_RESTORE"), |
| 6108 | "ON", "Value Computed by CMake", cmStateEnums::STATIC); |
| 6109 | } |
| 6110 | } |
| 6111 | } |
| 6112 | } |
no test coverage detected