Index: plugins/cmake/cmakeutils.h =================================================================== --- plugins/cmake/cmakeutils.h +++ plugins/cmake/cmakeutils.h @@ -105,11 +105,6 @@ KDEVCMAKECOMMON_EXPORT QString currentBuildType( KDevelop::IProject* project, int builddir = -1 ); /** - * @returns the current build type for the given project or "Release" as default value. - */ - KDEVCMAKECOMMON_EXPORT QString currentCmakeExecutable( KDevelop::IProject* project, int builddir = -1 ); - - /** * @returns the CMake executable, taking into account standard * installation dirs on Windows, or empty string in case of failure. */ @@ -168,7 +163,7 @@ /** * Sets the current CMake executable for the given project. */ - KDEVCMAKECOMMON_EXPORT void setCurrentCMakeExecutable(KDevelop::IProject* project, const KDevelop::Path& path); + KDEVCMAKECOMMON_EXPORT void setCurrentCMakeExecutable(KDevelop::IProject* project, const QString& executable); /** * Sets the current build dir for the given project. @@ -186,11 +181,6 @@ KDEVCMAKECOMMON_EXPORT void setCurrentExtraArguments( KDevelop::IProject* project, const QString& args ); /** - * Sets the current CMake binary the given project. - */ - KDEVCMAKECOMMON_EXPORT void setCurrentCmakeExecutable(KDevelop::IProject* project, const QString& string); - - /** * Obtains a cmake documentation instance if it exists */ KDEVCMAKECOMMON_EXPORT ICMakeDocumentation* cmakeDocumentation(); Index: plugins/cmake/cmakeutils.cpp =================================================================== --- plugins/cmake/cmakeutils.cpp +++ plugins/cmake/cmakeutils.cpp @@ -243,7 +243,7 @@ CMake::setCurrentInstallDir( project, bd.installPrefix() ); CMake::setCurrentExtraArguments( project, bd.extraArguments() ); CMake::setCurrentBuildType( project, bd.buildType() ); - CMake::setCurrentCMakeExecutable(project, bd.cmakeExecutable()); + CMake::setCurrentCMakeExecutable(project, bd.cmakeExecutable().toLocalFile()); CMake::setCurrentEnvironment( project, QString() ); } setBuildDirRuntime( project, currentRuntime ); @@ -382,11 +382,6 @@ return readBuildDirParameter( project, Config::Specific::cmakeArgumentsKey, QString(), builddir ); } -QString currentCmakeExecutable( KDevelop::IProject* project, int builddir ) -{ - return readBuildDirParameter( project, Config::Specific::cmakeExecutableKey, QString(), builddir ); -} - void setCurrentInstallDir( KDevelop::IProject* project, const KDevelop::Path& path ) { writeBuildDirParameter( project, Config::Specific::cmakeInstallDirKey, path.toLocalFile() ); @@ -397,11 +392,11 @@ writeBuildDirParameter( project, Config::Specific::cmakeBuildTypeKey, type ); } -void setCurrentCMakeExecutable(KDevelop::IProject* project, const KDevelop::Path& path) +void setCurrentCMakeExecutable(KDevelop::IProject* project, const QString& executable) { // maintain compatibility with older versions for now - writeBuildDirParameter(project, Config::Specific::cmakeBinaryKey, path.toLocalFile()); - writeBuildDirParameter(project, Config::Specific::cmakeExecutableKey, path.toLocalFile()); + writeBuildDirParameter(project, Config::Specific::cmakeBinaryKey, executable); + writeBuildDirParameter(project, Config::Specific::cmakeExecutableKey, executable); } void setCurrentBuildDir( KDevelop::IProject* project, const KDevelop::Path& path ) @@ -419,11 +414,6 @@ writeBuildDirParameter( project, Config::Specific::cmakeArgumentsKey, string ); } -void setCurrentCmakeExecutable( KDevelop::IProject* project, const QString& string ) -{ - writeBuildDirParameter( project, Config::Specific::cmakeExecutableKey, string ); -} - QString currentEnvironment(KDevelop::IProject* project, int builddir) { return readBuildDirParameter( project, Config::Specific::cmakeEnvironmentKey, QString(), builddir ); Index: plugins/cmake/settings/cmakepreferences.cpp =================================================================== --- plugins/cmake/settings/cmakepreferences.cpp +++ plugins/cmake/settings/cmakepreferences.cpp @@ -170,15 +170,15 @@ } CMake::setCurrentBuildType( m_project, buildType ); CMake::setCurrentExtraArguments( m_project, m_prefsUi->extraArguments->currentText() ); - CMake::setCurrentCmakeExecutable( m_project, m_prefsUi->cMakeExecutable->text() ); + CMake::setCurrentCMakeExecutable( m_project, m_prefsUi->cMakeExecutable->text() ); qCDebug(CMAKE) << "writing to cmake config: using builddir " << CMake::currentBuildDirIndex(m_project); qCDebug(CMAKE) << "writing to cmake config: builddir path " << CMake::currentBuildDir(m_project); qCDebug(CMAKE) << "writing to cmake config: installdir " << CMake::currentInstallDir(m_project); qCDebug(CMAKE) << "writing to cmake config: build type " << CMake::currentBuildType(m_project); qCDebug(CMAKE) << "writing to cmake config: cmake executable " << CMake::currentCMakeExecutable(m_project); qCDebug(CMAKE) << "writing to cmake config: environment " << CMake::currentEnvironment(m_project); - qCDebug(CMAKE) << "writing to cmake config: cmake executable " << CMake::currentCmakeExecutable(m_project); + qCDebug(CMAKE) << "writing to cmake config: cmake executable " << CMake::currentCMakeExecutable(m_project); //We run cmake on the builddir to generate it @@ -318,7 +318,7 @@ CMake::setCurrentInstallDir( m_project, bdCreator.installPrefix() ); CMake::setCurrentExtraArguments( m_project, bdCreator.extraArguments() ); CMake::setCurrentBuildType( m_project, bdCreator.buildType() ); - CMake::setCurrentCMakeExecutable(m_project, bdCreator.cmakeExecutable()); + CMake::setCurrentCMakeExecutable(m_project, bdCreator.cmakeExecutable().toLocalFile()); CMake::setCurrentEnvironment( m_project, QString() ); QString newbuilddir = bdCreator.buildFolder().toLocalFile(); Index: plugins/cmakebuilder/cmakejob.cpp =================================================================== --- plugins/cmakebuilder/cmakejob.cpp +++ plugins/cmakebuilder/cmakejob.cpp @@ -82,11 +82,7 @@ QStringList CMakeJob::commandLine() const { QStringList args; - QString cmakeProjectExecutable = CMake::currentCmakeExecutable( m_project ); - args << - (cmakeProjectExecutable.isEmpty() ? - CMakeBuilderSettings::self()->cmakeExecutable().toLocalFile() : cmakeProjectExecutable); - + args << CMake::currentCMakeExecutable(m_project).toLocalFile(); args << QStringLiteral("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"); QString installDir = CMake::currentInstallDir( m_project ).toLocalFile();