Changeset View
Changeset View
Standalone View
Standalone View
projectbuilders/cmakebuilder/cmakejob.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
77 | qCDebug(KDEV_CMAKEBUILDER) << "builddir: " << path; | 77 | qCDebug(KDEV_CMAKEBUILDER) << "builddir: " << path; | ||
78 | Q_ASSERT(path.isValid()); //We cannot get the project folder as a build directory! | 78 | Q_ASSERT(path.isValid()); //We cannot get the project folder as a build directory! | ||
79 | return path.toUrl(); | 79 | return path.toUrl(); | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | QStringList CMakeJob::commandLine() const | 82 | QStringList CMakeJob::commandLine() const | ||
83 | { | 83 | { | ||
84 | QStringList args; | 84 | QStringList args; | ||
85 | args << CMakeBuilderSettings::self()->cmakeExecutable().toLocalFile(); | 85 | QString cmakeProjectExecutable = CMake::currentCmakeExecutable( m_project ); | ||
86 | args << | ||||
87 | (cmakeProjectExecutable.isEmpty() ? | ||||
88 | CMakeBuilderSettings::self()->cmakeExecutable().toLocalFile() : cmakeProjectExecutable); | ||||
89 | | ||||
86 | args << QStringLiteral("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"); | 90 | args << QStringLiteral("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"); | ||
87 | 91 | | |||
88 | QString installDir = CMake::currentInstallDir( m_project ).toLocalFile(); | 92 | QString installDir = CMake::currentInstallDir( m_project ).toLocalFile(); | ||
89 | if( !installDir.isEmpty() ) | 93 | if( !installDir.isEmpty() ) | ||
90 | { | 94 | { | ||
91 | args << QStringLiteral("-DCMAKE_INSTALL_PREFIX=%1").arg(installDir); | 95 | args << QStringLiteral("-DCMAKE_INSTALL_PREFIX=%1").arg(installDir); | ||
92 | } | 96 | } | ||
93 | QString buildType = CMake::currentBuildType( m_project ); | 97 | QString buildType = CMake::currentBuildType( m_project ); | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |