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

Method AddFeatureFlags

Source/cmLocalGenerator.cxx:2466–2483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2464}
2465
2466void cmLocalGenerator::AddFeatureFlags(std::string& flags,
2467 cmGeneratorTarget const* target,
2468 std::string const& lang,
2469 std::string const& config)
2470{
2471 int targetType = target->GetType();
2472
2473 bool shared = ((targetType == cmStateEnums::SHARED_LIBRARY) ||
2474 (targetType == cmStateEnums::MODULE_LIBRARY));
2475
2476 if (target->GetLinkInterfaceDependentBoolProperty(
2477 "POSITION_INDEPENDENT_CODE", config)) {
2478 this->AddPositionIndependentFlags(flags, lang, targetType);
2479 }
2480 if (shared) {
2481 this->AppendFeatureOptions(flags, lang, "DLL");
2482 }
2483}
2484
2485void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags,
2486 std::string const& lang,

Callers 3

GetTargetCompileFlagsMethod · 0.95
CreateBuildSettingsMethod · 0.80
SetCompilerFlagsMethod · 0.80

Calls 4

AppendFeatureOptionsMethod · 0.95
GetTypeMethod · 0.45

Tested by

no test coverage detected