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

Method GetSingleFileBuildCommand

Source/cmExtraCodeLiteGenerator.cxx:667–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667std::string cmExtraCodeLiteGenerator::GetSingleFileBuildCommand(
668 cmMakefile const* mf) const
669{
670 std::string buildCommand;
671 std::string const& make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
672 std::string const& generator = mf->GetSafeDefinition("CMAKE_GENERATOR");
673 if (generator == "Unix Makefiles" || generator == "MinGW Makefiles") {
674 std::ostringstream ss;
675#if defined(_WIN32)
676 ss << make << " -f$(ProjectPath)/Makefile -B $(CurrentFileFullName).obj";
677#else
678 ss << make << " -f$(ProjectPath)/Makefile -B $(CurrentFileFullName).o";
679#endif
680 buildCommand = ss.str();
681 }
682 return buildCommand;
683}

Callers 1

Calls 1

strMethod · 0.80

Tested by

no test coverage detected