Summary: | Launch target from previous build directory after build dir switch | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Sergey Vidyuk <sir.vestnik> |
Component: | Build tools: CMake | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol |
Priority: | NOR | ||
Version: | 4.5.60 | ||
Target Milestone: | 4.3.0 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/8424a911212d74cfe482bcff70595465f4f0b52f | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
project to reproduce issue
simple project to reproduce the issue |
Description
Sergey Vidyuk
2013-03-30 08:05:06 UTC
I just tried to execute a target and switch build directories and it works fine. Am I missing something? Searching for a simple example to reproduce, hope to find it today. Some notes: I'm using Ninja for build. My build directories were created from console and then addad to kdevelop. one of build configurations uses toolchain. Created attachment 79408 [details]
project to reproduce issue
Failed to find simple project to reproduse this bug. There is a hobby project I'm working on which always reproduces this behaviour.
Does comment #3 provide the required information? Please set the status correctly. Yes comment #3 provides project to reproduce this issue. Moving status to unconfirmed since it's the only valuable status I can set different from needs info. Created attachment 79467 [details]
simple project to reproduce the issue
I have found the origin of the issue and have created example project to reproduce it.
If executable target have RUNTIME_OUTPUT_DIRECTORY property set the path to the executable is calculated only once on project load by the function CMakeManager::parse. If this property value is some path relative to a build dir (like ${CMAKE_BINARY_DIR}/bin) then cache should be recalculated when build configuration changed.
https://git.reviewboard.kde.org/r/110215/ possible fix Git commit 8424a911212d74cfe482bcff70595465f4f0b52f by Aleix Pol. Committed on 30/04/2013 at 20:03. Pushed by apol into branch 'master'. Explicitly reload the model whenever the cache has changed This way we make sure the project is re-parsed with the new CMakeCache, this was a problem with some projects that use RUNTIME_OUTPUT_DIRECTORY M +1 -0 projectmanagers/cmake/settings/cmakepreferences.cpp http://commits.kde.org/kdevelop/8424a911212d74cfe482bcff70595465f4f0b52f |