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

Function TwoArgsSignature

Source/cmBuildCommand.cxx:94–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94bool TwoArgsSignature(std::vector<std::string> const& args,
95 cmExecutionStatus& status)
96{
97 if (args.size() < 2) {
98 status.SetError("called with less than two arguments");
99 return false;
100 }
101
102 cmMakefile& mf = status.GetMakefile();
103
104 std::string const& define = args[0];
105 cmValue cacheValue = mf.GetDefinition(define);
106
107 std::string configType;
108 if (!cmSystemTools::GetEnv("CMAKE_CONFIG_TYPE", configType) ||
109 configType.empty()) {
110 configType = "Release";
111 }
112
113 std::string makecommand = mf.GetGlobalGenerator()->GenerateCMakeBuildCommand(
114 "", configType, "", "", false);
115
116 if (cacheValue) {
117 return true;
118 }
119 mf.AddCacheDefinition(define, makecommand,
120 "Command used to build entire project "
121 "from the command line.",
122 cmStateEnums::STRING);
123 return true;
124}
125
126} // namespace
127

Callers 1

cmBuildCommandFunction · 0.85

Calls 8

sizeMethod · 0.45
SetErrorMethod · 0.45
GetMakefileMethod · 0.45
GetDefinitionMethod · 0.45
emptyMethod · 0.45
GetGlobalGeneratorMethod · 0.45
AddCacheDefinitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…