| 303 | } |
| 304 | |
| 305 | void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags, |
| 306 | std::string const& lang, |
| 307 | char const* name, bool so) |
| 308 | { |
| 309 | // Lookup the flag to specify the version. |
| 310 | std::string fvar = cmStrCat("CMAKE_", lang, "_OSX_", name, "_VERSION_FLAG"); |
| 311 | cmValue flag = this->Makefile->GetDefinition(fvar); |
| 312 | |
| 313 | // Skip if no such flag. |
| 314 | if (!flag) { |
| 315 | return; |
| 316 | } |
| 317 | |
| 318 | // Lookup the target version information. |
| 319 | int major; |
| 320 | int minor; |
| 321 | int patch; |
| 322 | std::string prop = cmStrCat("MACHO_", name, "_VERSION"); |
| 323 | std::string fallback_prop = so ? "SOVERSION" : "VERSION"; |
| 324 | this->GeneratorTarget->GetTargetVersionFallback(prop, fallback_prop, major, |
| 325 | minor, patch); |
| 326 | if (major > 0 || minor > 0 || patch > 0) { |
| 327 | // Append the flag since a non-zero version is specified. |
| 328 | std::ostringstream vflag; |
| 329 | vflag << *flag << major << "." << minor << "." << patch; |
| 330 | this->LocalCommonGenerator->AppendFlags(flags, vflag.str()); |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | std::string cmCommonTargetGenerator::GetCompilerLauncher( |
| 335 | std::string const& lang, std::string const& config) |
no test coverage detected