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

Method AddRanlibRule

Source/cmInstallTargetGenerator.cxx:906–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906void cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, Indent indent,
907 std::string const& toDestDirPath)
908{
909 // Static libraries need ranlib on this platform.
910 if (this->Target->GetType() != cmStateEnums::STATIC_LIBRARY) {
911 return;
912 }
913
914 // Perform post-installation processing on the file depending
915 // on its type.
916 if (!this->Target->IsApple()) {
917 return;
918 }
919
920 std::string const& ranlib =
921 this->Target->Target->GetMakefile()->GetRequiredDefinition("CMAKE_RANLIB");
922 if (ranlib.empty()) {
923 return;
924 }
925
926 os << indent << "execute_process(COMMAND \"" << ranlib << "\" \""
927 << toDestDirPath << "\")\n";
928}
929
930void cmInstallTargetGenerator::AddUniversalInstallRule(
931 std::ostream& os, Indent indent, std::string const& toDestDirPath)

Callers 1

PostReplacementTweaksMethod · 0.95

Calls 4

GetTypeMethod · 0.45
IsAppleMethod · 0.45
GetMakefileMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected