[CMake] QtCreator Comments - was [CMake generators (Xcode and Unix Makefile)]
Michael Jackson
mike.jackson at bluequartz.net
Thu Apr 16 07:31:54 EDT 2009
On Apr 16, 2009, at 6:33 AM, Tobias Rudolph wrote:
>
> On 16 Apr 2009, at 11:54, Andreas Pakulat wrote:
>
>> On 16.04.09 09:26:45, Tobias Rudolph wrote:
>>> On 15 Apr 2009, at 22:35, Alexander Neundorf wrote:
>>>> On Wednesday 15 April 2009, Michael Jackson wrote:
>>>>> On Apr 15, 2009, at 9:57 AM, christophe laferriere wrote:
>>>> ...
>>>>>> - some of my headers are generated by cmake (myproj.h.in became
>>>>>> myproj.h and is include in some tests for example) but I can't
>>>>>> find
>>>>>> those files in the xcode project I get.
>>>>>>
>>>>>> Thanks in advance for any good advice on how I can combine xcode
>>>>>> project and unix makefile to be able to use both.
>>>>>
>>>>> Use 2 separate build directories for each type of build files, ie,
>>>>> use
>>>>> Build-make for makefiles and Build-xcode for Xcode project builds.
>>>>> This will ensure each build directory has the correct build
>>>>> files and
>>>>> generated files for its use.
>>>>
>>>> With xcode projects you could also use "xcodebuild" from the
>>>> command
>>>> line to
>>>> build the project.
>>>>
>>>>> In your add_executable() command, in addition to the source files
>>>>> also
>>>>> include the headers and generated headers for those to show up in
>>>>> Xcode.
>>>>>
>>>>> Lastly, in the Xcode preferences, under the "Debugging" topic
>>>>> you may
>>>>> want to turn OFF the "Load Symbols Lazily" so debugging actually
>>>>> works.
>>>>>
>>>>> <opinion>If Xcode is too much of a pain and you are NOT building
>>>>> 64
>>>>> bit binaries then you can try Eclipse CDT instead. It will work
>>>>> with
>>>>> your makefiles OR you can use the Eclipse CDT generator to
>>>>> generate
>>>>> an
>>>>> actual Eclipse CDT project. I personally use Eclipse CDT with
>>>>> plain
>>>>> makefiles and am very happy with it. There seems to be an issue
>>>>> with
>>>>> Eclipse being able to recognize a 64 bit binary. You can still
>>>>> build
>>>>> them but the Eclipse CDT debugger does not recognize them to
>>>>> actually
>>>>> debug them. bummer.</opinion>
>>>>>
>>>>> <Even more lastly>Qt has "QtCreator" which is starting to get
>>>>> support
>>>>> for Makefiles. In early versions it looked very promising and was
>>>>> faster to edit files than either Eclipse or Xcode. Just
>>>>> something to
>>>>> keep on eye on.</Even more lastly>
>>>>
>>>> QtCreator supports loading CodeBlocks project files, which cmake
>>>> can
>>>> generate
>>>> (this was added to QtCreator especially for the purpose of better
>>>> support for
>>>> cmake)
>>>
>>> QtCreator has bulit-in support for CMakeLists.txt files.
>>
>> No it does not, it generates a CodeBlocks file behind the scenes
>> and then
>> uses the information from that to supply include directories and so
>> on to
>> the rest of the IDE. I didn't check how it actually builds cmake
>> projects,
>> but I'm guessing it uses one of the Makefile generators (i.e.
>> unix-makefiles or nmake) in the configured builddir to build the
>> projects.
>> Andreas
>>
>
> That's true, it uses UNIX Makefiles (I am on MacOSX). But, this is
> happening behind the scenes and the process is well integrated into
> the IDE.
>
> tobias
Actually, the latest release candidate of QtCreator has "basic"
makefile support so hopefully that would mature more in the near
future. I also had the opportunity to chat with one of the QtCreator
developers about the CMake support in QtCreator and basically
generating a CodeBlocks file behind the scenes (which could take a
while for large projects) so that they can then parse the xml to find
include directories, link flags, compile flags and all that. There was
also information that was _missing_ from the xml that was actually
needed by QtCreator. Turns out the Visual Studio project file has
everything that is needed but obviously only available on Windows
systems. Basically what this boils down to is there may need to be a
new generator for QtCreator. This would require cooperation between
the QtCreator team and the developers creating that generator so that
everything that is needed is put into the generator. This will end up
being kind of a boot strapping process at first but in the end I think
would be well worth it for both CMake and QtCreator.
I am currently buried with work so the most I can do is just
dream. If someone else wants to start something that would be great.
You can usually find the QtCreators on their IRC channel.
Cheers
------
Mike Jackson
More information about the CMake
mailing list