MCPcopy Create free account
hub / github.com/KDE/kdevelop / resolveSystemDirs

Function resolveSystemDirs

plugins/cmake/cmakeutils.cpp:102–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100{
101
102KDevelop::Path::List resolveSystemDirs(KDevelop::IProject* project, const QStringList& dirs)
103{
104 const KDevelop::Path buildDir(CMake::currentBuildDir(project));
105 const KDevelop::Path installDir(CMake::currentInstallDir(project));
106
107 KDevelop::Path::List newList;
108 newList.reserve(dirs.size());
109 for (const QString& s : dirs) {
110 KDevelop::Path dir;
111 if(s.startsWith(QLatin1String("#[bin_dir]")))
112 {
113 dir = KDevelop::Path(buildDir, s);
114 }
115 else if(s.startsWith(QLatin1String("#[install_dir]")))
116 {
117 dir = KDevelop::Path(installDir, s);
118 }
119 else
120 {
121 dir = KDevelop::Path(s);
122 }
123
124// qCDebug(CMAKE) << "resolved" << s << "to" << d;
125
126 if (!newList.contains(dir))
127 {
128 newList.append(dir);
129 }
130 }
131 return newList;
132}
133
134///NOTE: when you change this, update @c defaultConfigure in cmakemanagertest.cpp
135bool checkForNeedingConfigure( KDevelop::IProject* project )

Callers

nothing calls this directly

Calls 7

currentBuildDirFunction · 0.85
currentInstallDirFunction · 0.85
PathClass · 0.70
reserveMethod · 0.45
sizeMethod · 0.45
containsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected