I have project with 2 build configurations in KDevelop: * Blackberry Tablet OS (armv7) cross-compilation * Linux desktop (x86_64) host compilation Launch configuration initally created during host version development by right click on target in project manager view and "Debug Application" entry in context menu. Then I was working with crosscompile confiduration for some time (several rebuilds of KDevelop from 4.5 git branch). Yesterday I've switched back to desktop configuration and pressed F9 to run in debug however KDevelop tried to execute binary from previous build configuration and had some problems to run armv7 binary on x86_64 hardware. Delete and create launch configuration again doesn't solve the issue. The only workaround was to set correct executable path in launch configuration instead of specifying project target. I've configured launcher back to use project target after KDevelop restart (build configuration at startup is host build configuration) and now correct executable is started. Looks like KDevelop use build directory path of the configuration at startup/project load and do not recalculate launcher path on configuration switch. Reproducible: Didn't try Linux distro Arch 64bit with up to date packages. Kdevelop is build from 4.5 git branch KDevPlatform is build from 1.5 git branch
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