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

Function currentCMakeExecutable

plugins/cmake/cmakeutils.cpp:311–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311KDevelop::Path currentCMakeExecutable(KDevelop::IProject* project, int builddir)
312{
313 auto defaultCMakeExecutable = CMakeBuilderSettings::self()->cmakeExecutable().toLocalFile();
314
315 if (!QFileInfo::exists(ICore::self()->runtimeController()->currentRuntime()->pathInHost(KDevelop::Path(defaultCMakeExecutable)).toLocalFile()))
316 defaultCMakeExecutable = CMake::findExecutable();
317
318 if (project) {
319 // check for "CMake Executable" but for now also "CMake Binary", falling back to the default.
320 auto projectCMakeExecutable = readBuildDirParameter( project, Config::Specific::cmakeExecutableKey,
321 readBuildDirParameter( project, Config::Specific::cmakeBinaryKey, defaultCMakeExecutable, builddir),
322 builddir );
323 if (projectCMakeExecutable != defaultCMakeExecutable) {
324 QFileInfo info(projectCMakeExecutable);
325 if (!info.isExecutable()) {
326 projectCMakeExecutable = defaultCMakeExecutable;
327 }
328 }
329 return KDevelop::Path(projectCMakeExecutable);
330 }
331 return KDevelop::Path(defaultCMakeExecutable);
332}
333
334KDevelop::Path currentInstallDir( KDevelop::IProject* project, int builddir )
335{

Callers 8

commandLineMethod · 0.85
startMethod · 0.85
CMakeServerMethod · 0.85
checkForNeedingConfigureFunction · 0.85
initAdvancedMethod · 0.85
applyMethod · 0.85
removeBuildDirMethod · 0.85

Calls 8

readBuildDirParameterFunction · 0.85
toLocalFileMethod · 0.80
cmakeExecutableMethod · 0.80
currentRuntimeMethod · 0.80
runtimeControllerMethod · 0.80
PathClass · 0.70
findExecutableFunction · 0.70
pathInHostMethod · 0.45

Tested by

no test coverage detected