| 825 | } |
| 826 | |
| 827 | std::set<std::string> cmGlobalVisualStudioGenerator::IsPartOfDefaultBuild( |
| 828 | std::vector<std::string> const& configs, |
| 829 | TargetDependSet const& projectTargets, cmGeneratorTarget const* target) const |
| 830 | { |
| 831 | std::set<std::string> activeConfigs; |
| 832 | // if it is a utility target then only make it part of the |
| 833 | // default build if another target depends on it |
| 834 | int type = target->GetType(); |
| 835 | if (type == cmStateEnums::GLOBAL_TARGET) { |
| 836 | std::vector<std::string> targetNames; |
| 837 | targetNames.push_back("INSTALL"); |
| 838 | targetNames.push_back("PACKAGE"); |
| 839 | for (std::string const& t : targetNames) { |
| 840 | // check if target <t> is part of default build |
| 841 | if (target->GetName() == t) { |
| 842 | std::string const propertyName = |
| 843 | cmStrCat("CMAKE_VS_INCLUDE_", t, "_TO_DEFAULT_BUILD"); |
| 844 | // inspect CMAKE_VS_INCLUDE_<t>_TO_DEFAULT_BUILD properties |
| 845 | for (std::string const& i : configs) { |
| 846 | cmValue propertyValue = |
| 847 | target->Target->GetMakefile()->GetDefinition(propertyName); |
| 848 | if (propertyValue && |
| 849 | cmIsOn(cmGeneratorExpression::Evaluate( |
| 850 | *propertyValue, target->GetLocalGenerator(), i))) { |
| 851 | activeConfigs.insert(i); |
| 852 | } |
| 853 | } |
| 854 | } |
| 855 | } |
| 856 | return activeConfigs; |
| 857 | } |
| 858 | if (type == cmStateEnums::UTILITY && |
| 859 | !this->IsDependedOn(projectTargets, target)) { |
| 860 | return activeConfigs; |
| 861 | } |
| 862 | // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties |
| 863 | for (std::string const& i : configs) { |
| 864 | if (target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i).IsOff()) { |
| 865 | activeConfigs.insert(i); |
| 866 | } |
| 867 | } |
| 868 | return activeConfigs; |
| 869 | } |
| 870 | |
| 871 | std::string cmGlobalVisualStudioGenerator::GetGUID( |
| 872 | std::string const& name) const |
no test coverage detected