MCPcopy Create free account
hub / github.com/Kitware/CMake / GetProperty

Method GetProperty

Source/cmTarget.cxx:2600–2747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2598}
2599
2600cmValue cmTarget::GetProperty(std::string const& prop) const
2601{
2602 static std::unordered_set<std::string> const specialProps{
2603 propC_STANDARD,
2604 propCXX_STANDARD,
2605 propCUDA_STANDARD,
2606 propHIP_STANDARD,
2607 propOBJC_STANDARD,
2608 propOBJCXX_STANDARD,
2609 propLINK_LIBRARIES,
2610 propTYPE,
2611 propINCLUDE_DIRECTORIES,
2612 propCOMPILE_FEATURES,
2613 propCOMPILE_OPTIONS,
2614 propCOMPILE_DEFINITIONS,
2615 propPRECOMPILE_HEADERS,
2616 propLINK_OPTIONS,
2617 propLINK_DIRECTORIES,
2618 propIMPORTED,
2619 propIMPORTED_GLOBAL,
2620 propMANUALLY_ADDED_DEPENDENCIES,
2621 propNAME,
2622 propBINARY_DIR,
2623 propSOURCE_DIR,
2624 propSOURCES,
2625 propSYMBOLIC,
2626 propINTERFACE_LINK_LIBRARIES,
2627 propINTERFACE_LINK_LIBRARIES_DIRECT,
2628 propINTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE,
2629 propIMPORTED_CXX_MODULES_INCLUDE_DIRECTORIES,
2630 propIMPORTED_CXX_MODULES_COMPILE_DEFINITIONS,
2631 propIMPORTED_CXX_MODULES_COMPILE_FEATURES,
2632 propIMPORTED_CXX_MODULES_COMPILE_OPTIONS,
2633 propIMPORTED_CXX_MODULES_LINK_LIBRARIES,
2634 };
2635 if (specialProps.count(prop)) {
2636 if (prop == propC_STANDARD || prop == propCXX_STANDARD ||
2637 prop == propCUDA_STANDARD || prop == propHIP_STANDARD ||
2638 prop == propOBJC_STANDARD || prop == propOBJCXX_STANDARD) {
2639 auto propertyIter = this->impl->LanguageStandardProperties.find(prop);
2640 if (propertyIter == this->impl->LanguageStandardProperties.end()) {
2641 return nullptr;
2642 }
2643 return cmValue(propertyIter->second.Value);
2644 }
2645
2646 if (prop == propSYMBOLIC) {
2647 return this->IsSymbolic() ? cmValue(propTRUE) : cmValue(propFALSE);
2648 }
2649
2650 UsageRequirementProperty const* usageRequirements[] = {
2651 &this->impl->IncludeDirectories,
2652 &this->impl->CompileOptions,
2653 &this->impl->CompileFeatures,
2654 &this->impl->CompileDefinitions,
2655 &this->impl->PrecompileHeaders,
2656 &this->impl->Sources,
2657 &this->impl->LinkOptions,

Callers 9

CheckPropertyMethod · 0.95
GetPropertyAsBoolMethod · 0.95
ImportedGetFullPathMethod · 0.95
GetMappedConfigOldMethod · 0.95
GetLocationMethod · 0.95
GetMappedConfigNewMethod · 0.95
cmTarget.cxxFile · 0.45

Calls 15

IsSymbolicMethod · 0.95
GetTypeMethod · 0.95
transformFunction · 0.85
to_stringFunction · 0.85
cbeginMethod · 0.80
cendMethod · 0.80
ReadPropertiesMethod · 0.80
GetPropertyValueMethod · 0.80
IsPropertyChainedMethod · 0.80
cmValueClass · 0.70
countMethod · 0.45

Tested by

no test coverage detected