Bug 295521 - Wrong path for file genereated by add_custom_command
Summary: Wrong path for file genereated by add_custom_command
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Unclassified
Component: Build tools: CMake (show other bugs)
Version: 4.2.90
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 11:56 UTC by Radek Novacek
Modified: 2012-07-30 00:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Minimal example (501 bytes, application/gzipped-tar)
2012-03-08 11:56 UTC, Radek Novacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Novacek 2012-03-08 11:56:12 UTC
Created attachment 69365 [details]
Minimal example

When C++ source file is generated using add_custom_command, the generated file has wrong path and can't be opened from kdevelop. 

The file entry is present in "Projects" tool view, as child of executable, but the path is pointing to CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_CURRENT_BINARY_DIR or other file when the file is really present.

So, the file cannot be opened by clicking at it and trying to "Open As Byte Array" results to kdevelop crash.

See attached minimal example.
Comment 1 Aleix Pol 2012-07-30 00:39:50 UTC
Git commit 918f82758be43e037d9c0c47acf9a63b07e49291 by Aleix Pol.
Committed on 30/07/2012 at 02:39.
Pushed by apol into branch '4.4'.

Make it possible to open inputs generated in the build directory

It's not very useful because one shouldn't use the project view to debug
generated files, but considering that it wasn't working anyway I thought
it made sense to make it work.

M  +8    -3    projectmanagers/cmake/cmakemanager.cpp

http://commits.kde.org/kdevelop/918f82758be43e037d9c0c47acf9a63b07e49291
Comment 2 Aleix Pol 2012-07-30 00:39:50 UTC
Git commit bd19c7eb30e2d0042462ec3ac678f736a8c970ef by Aleix Pol.
Committed on 30/07/2012 at 02:39.
Pushed by apol into branch 'master'.

Make it possible to open inputs generated in the build directory

It's not very useful because one shouldn't use the project view to debug
generated files, but considering that it wasn't working anyway I thought
it made sense to make it work.

M  +8    -3    projectmanagers/cmake/cmakemanager.cpp

http://commits.kde.org/kdevelop/bd19c7eb30e2d0042462ec3ac678f736a8c970ef