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

Function cmLinkDirectoriesCommand

Source/cmLinkDirectoriesCommand.cxx:15–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 std::vector<std::string>& directories);
14
15bool cmLinkDirectoriesCommand(std::vector<std::string> const& args,
16 cmExecutionStatus& status)
17{
18 if (args.empty()) {
19 return true;
20 }
21
22 cmMakefile& mf = status.GetMakefile();
23 bool before = mf.IsOn("CMAKE_LINK_DIRECTORIES_BEFORE");
24
25 auto i = args.cbegin();
26 if ((*i) == "BEFORE") {
27 before = true;
28 ++i;
29 } else if ((*i) == "AFTER") {
30 before = false;
31 ++i;
32 }
33
34 std::vector<std::string> directories;
35 for (; i != args.cend(); ++i) {
36 AddLinkDir(mf, *i, directories);
37 }
38
39 mf.AddLinkDirectory(cmList::to_string(directories), before);
40
41 return true;
42}
43
44static void AddLinkDir(cmMakefile& mf, std::string const& dir,
45 std::vector<std::string>& directories)

Callers

nothing calls this directly

Calls 8

AddLinkDirFunction · 0.85
to_stringFunction · 0.85
cbeginMethod · 0.80
cendMethod · 0.80
AddLinkDirectoryMethod · 0.80
emptyMethod · 0.45
GetMakefileMethod · 0.45
IsOnMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…