Notes |
|
(0038147)
|
Nils Gladitz
|
2015-03-05 08:53
|
|
It looks like the format allows for one or more <Option target="target-name"/> elements under each <Unit> element for this.
It also looks like QtCreator's cbp parser does not handle those (yet). |
|
|
(0038149)
|
Peter Kuemmel
|
2015-03-05 12:30
|
|
Is this only available in CMake 3.2? |
|
|
(0038150)
|
Nils Gladitz
|
2015-03-05 12:39
|
|
Is that in response to me? What do you mean specifically?
I was looking at the CodeBlocks's project specification and into what would be required in CMake and QtCreator but I haven't actually implemented anything. |
|
|
(0038151)
|
Peter Kuemmel
|
2015-03-05 14:16
|
|
Yes, when I use cmake version 3.1.3, I don't see any <Option target="target-name"/> under <Unit>.
Is this already available in 3.2, or needs it to be implemented? |
|
|
(0038152)
|
Nils Gladitz
|
2015-03-05 14:22
|
|
No like I said I was looking into what would be required to implement this hence this isn't implemented yet.
In CMake this looks simple enough but I am not really sure about what would be required in QtCreator. |
|
|
(0038155)
|
Nils Gladitz
|
2015-03-06 03:53
|
|
|
|
(0038158)
|
Nils Gladitz
|
2015-03-06 09:13
|
|
It looks like neither QtCreator nor CodeBlocks itself choke on the new elements and CodeBlocks does seems to properly associate source files with the targets that they belong to now.
I've merged to "next" for testing. |
|
|
(0038175)
|
Peter Kuemmel
|
2015-03-07 10:17
|
|
|
|
(0038181)
|
Nils Gladitz
|
2015-03-09 07:36
|
|
Minor clarification; the earliest CMake release this could get into is 3.3 rather than 3.2.
I tried your QtCreator changes with this test case:
https://gist.github.com/ngladitz/a2ea8df64ba36bdf1077 [^]
In foo.cpp the code model seems to correctly see that FOO is defined and BAR isn't.
In bar.cpp however both FOO and BAR seem to be defined (expected would be that only BAR is defined).
With vanilla QtCreator 3.3.1 FOO is defined in both foo.cpp and bar.cpp and BAR is defined in neither. |
|
|
(0038200)
|
Peter Kuemmel
|
2015-03-11 08:58
|
|
I've tested with your gist, and the code model now looks correct, but highlighting in the editor does not work; maybe different issue in qtcreator. |
|
|
(0038202)
|
Nils Gladitz
|
2015-03-11 13:37
|
|
Thanks! It seems to work for me as well.
The highlighting defaults seem to have changed in QtCreator.
I changed "Text Editor" -> "Font & Colors" -> "Disabled Code" in the "Color Scheme" and it highlights as expected.
In "Tools" -> "C++" -> "Inspect C++ Code Model..." in the "Project Parts" tab "foo" seems to list foo.cpp twice under "Project Files" while "bar" shows bar.cpp only once.
Could that be an issue? |
|
|
(0038205)
|
Peter Kuemmel
|
2015-03-11 17:28
|
|
Here still both ifdefs are disabled in both files, but there should be one enabled and one disabled.
> list foo.cpp twice under "Project Files"
Not here, have you build latest 3.4? |
|
|
(0038206)
|
Nils Gladitz
|
2015-03-11 17:46
|
|
I used "Patch Set 4" (44694284a5290d5a065ae52246d83006770ac2ca) from the code review that you linked (screenshot attached). |
|
|
(0038210)
|
Peter Kuemmel
|
2015-03-14 02:31
(edited on: 2015-03-14 04:21) |
|
I abandoned creator patch, because it seems the file logic is completely path based, and the creator team there isn't very interested in CMake.
I tried CLion with your example, and there it works like expected! I will also have a look at Kdevelop.
So maybe it's time to move away from QtCreator until there is reliable meta information:
http://public.kitware.com/pipermail/cmake-developers/2015-March/024666.html [^]
|
|
|
(0038211)
|
Nils Gladitz
|
2015-03-14 04:05
|
|
|
|
(0038212)
|
Peter Kuemmel
|
2015-03-14 04:24
(edited on: 2015-04-15 05:59) |
|
Thanks, too. I hope someone of the creator guys has a look at it.
We should create a new QtCreator ticket when there is a CMake release which supports the target property, and upload the example project.
|
|
|
(0039771)
|
Robert Maynard
|
2015-11-02 09:13
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|