Version: 3.9.91 (using 4.2.3 (KDE 4.2.3), Kubuntu packages) Compiler: cc OS: Linux (x86_64) release 2.6.28-12-generic Using cmake 2.6-patch 2 KDevelop insist on building project into 'build' subdirectory. As project was build before in different dir, and CMakeCache.txt exists, cmake isn't creating Makefile in 'build' Therefore KDavelop is unable to build project: PROJECTDIR/build/./> make make: *** No targets specified and no makefile found. Stop. *** Failed *** And any attempt to configure project using config dialog results in infinite stream of message boxes stating that '`build` dir is invalid' and similar.
Are you saying that you cannot choose the original build directory? Can you provide a tarr'ed sample project that exhibits this problem?
Created attachment 34081 [details] Failing project Testcase: failing project. Duplication procedure was following: 1. open kdevelop4 2. go to: open project, select CMakeLists.txt 3. CMake import dialog offers you 'build' subdir as a build directory by default, accept. 4. Try to build project - it fails 5. try to change CMake configuration using project options. IT is unusable and pops annoying dialogs. To fix problem it is enough to delete CMakeCache.txt and run cmake manually from inside the 'build' dir.
Thanks that tells us a lot more. I strongly suggest not to do in-source builds with cmake. While thats usually possible, its always better to have a separate builddirectory. Currently KDevelop doesn't support in-source builds, so just clean your project from all cmake-generated files and let kdevelop build inside the build subdir, or choose a different directory outside your project for now.
I don't think it is a good idea to support in-source builds.
Aleix, you're wrong. While I and you don't like in-source-builds its a valid use-case for CMake projects. Hence our cmake plugin should support it.
Especially it should not screw up in the sense of "nothing works until I manually delete CMakeCache". And in-source building is not elegant, but sometimes a valid option, just consider "svn co project && cd project && cmake && make", sometimes fiddling around with build-directories is unneeded overhead.
Supporting in-source builds is one thing. Leaving user with messagebox frenzy and cryptic errors is another thing.
Now you can use an already created in source build directory but not to create a new one there. Is that ok?
sorry, but I think we should also support creating an in-source build.
We don't let the user to create build directories if the directory is not empty. Should we let the user do that? Or the only not-empty-directory we want to be able to create builddirs in is the source dir?
It's possible to use in-source builddirs right now (just checked now, i changed that a while ago).