Created attachment 63487 [details]
Version: git master (using KDE 4.7.0)
Attempt to compile single file fails if file is located in a subdirectory added to a main project using cmake add_subdirectory() function. Make is executed in wrong folder.
Steps to Reproduce:
1 Open a project attached
2 Modify timestamp on foo/bar2.cpp
3 Remove everything from "Project selection"
4 Add foo/bar2.cpp to Project selection
5 Pres F8 or "Build selection" button
Got the following output in build toolview:
/home/vestnik/Development/test/kdev4bug/build> make bar2.o
make: *** No rule to make target `bar2.o'. Stop.
*** Failed ***
"make bar.o" command should be executed from the "foo" subdirectory of the build tree instead of root of the build tree and should compile bar2.cpp successfully.
Git commit 5ff08ca46fea2c9e9b263f155dda68aeb3eb4412 by Aleix Pol.
Committed on 12/09/2011 at 04:40.
Pushed by apol into branch 'master'.
Make it possible again to compile just one file, use CMakeFolderItem
instead of ProjectFolderItem to pass the relative path.
M +8 -6 projectbuilders/cmakebuilder/cmakebuilder.cpp
Follow-up mine and Aleix discussion on #kdevelop,
I can reproduce the same problem wiht version 4.2.2 (installed from Linux Mint 11 packages)