Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Nikolaus Demmel
Hi Tobias,

On 31.03.2016, at 21:27, Hunger Tobias  wrote:
> On Thu, Mar 31, 2016 at 8:23 PM, Nikolaus Demmel 
>  wrote:
>>> You actually should not even need to rerun cmake, provided you set up 
>>> catkin to use the "-GCodeBlocks - Unix Makefiles" generator we need for Qt 
>>> Creator.
>> 
>> Is that enough? That sounds great. I thought that QtCreator might do some 
>> more "magic".
> 
> We try very hard to not do any magic, especially not with the build systems! 
> Ideally you should be able to open any project using one of the supported 
> build systems without any changes and without any special configuration in Qt 
> Creator.
> 
> That is one of the reasons why I sometimes joke that "Qt Creator is the best 
> IDE for everybody that hates IDEs":-)

Yeah I realize this more and more, and it is great. (Maybe my biggest criticism 
in that regard would be that QtCreator does nothing from command line, like 
e.g. the project generation that I was initially talking about).

This is actually to some extend also true for catkin. It tries very hard to 
make catkin packages behave like a standard cmake package. That’s the reason it 
already works great with QtCreator or any other IDE that supports plain Cmake. 

> 
>> This can be run easily for all packages with `catkin build --force-cmake 
>> --cmake-args "-GCodeBlocks - Unix Makefiles"`.
> 
> In fact I did
> catkin config -DCMAKE_BUILD_TYPE=Release "-GCodeBlocks - Unix Makefiles"

Yup, that works as well to have it permanently configured in your catkin 
workspace. But since QtCreator runs it as well every time, you can save a few 
cycles and not run the additional generator when calling cmake through `catkin 
build`. It shouldn’t hurt though.

> 
>> However I noticed that QtCreator currently reruns cmake in any case whenever 
>> you open a project. I think this is fine, and that way the user doesn't even 
>> have to remember to call `catkin build` with the `"-GCodeBlocks - Unix 
>> Makefiles"` argument manually.
> 
> I do not know catkin well enough to comment whether or not that is viable.

I think this is what people have done so far when using QtCreator with catkin. 
Since I think few people realize that QtCreator simply calls the CodeBlocks 
generator under the hood, they would not have run it manually. I think we can 
just leave everything as is for this point.

> 
> Qt Creator will rerun cmake though, since it needs to make sure there is no 
> stale data in the configuration it reads. Who knows what the user did to the 
> project since cmake was last run?

True, but most of the time cmake itself can tell if it needs to rerun or not, 
i.e. calling `make` will check if it should first re-run cmake, since e.g. one 
modified the CMakeLists.txt. But in any case, I think QtCreator does fine here, 
no need to change IMHO.

> 
 The step that is inconvenient, which I was asking about in this thread, is 
 the fact that for each ROS package, you have to manually select the 
 correct build directory and Kit when opening the project. Since there can 
 be many ROS packages in a workspace (>100), it gets cumbersome. That’s why 
 I am looking for a way to generate the project file (CMakeLists.txt.user) 
 from command line without user interaction. I want to be able to specify 
 the build directory(s), and also the configuration(s)/Kit(s). For the 
 latter it would be great if there was a “environment Kit”, which selects 
 compiler/qmake/cmake in the same way that cmake would on the command line 
 (in fact cmake has already been run from the initial `catkin build` call, 
 so QtCreator could just ask cmake what compiler it configured, which would 
 maybe be a sort of “cmake Kit”, where you let cmake run in the current 
 environment determine the compiler).
>>> 
>>> My original idea was to use the default build directory setting 
>>> (Tools>Options>Build & Run>General IIRC) and adapt that for catkin use. 
>>> Opening the source directory should then automatically pick up the right 
>>> build directory.
>> 
>> Your idea is to determine if the opened CMakeLists.txt file corresponds to a 
>> catkin package, and if yes, use some special logic to determine the correct 
>> build directory? This could be the perfect solution, I like it.
> 
> Even simpler: My idea was to just configure the default build directory for 
> all projects to point to wherever catkin will put its build directories. At 
> this point I am mostly thinking about how you can configure Qt Creator to 
> make things more convenient for you right now (or soon, since I assume you 
> will be using Qt Creator 4.0 for the better cmake experience;-).

Aha, I didn’t get that. That should work (as long as I only open catkin 
packages, not other cmake packages as well). Thanks for pointing that out 
again, I didn’t realize this was a setting.

It is somewhat limited though, since a relative path will not work with all 
packages (as I tried to explain they can be nested

Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Hunger Tobias
Hi Nikolaus,

On Thu, Mar 31, 2016 at 8:23 PM, Nikolaus Demmel  
wrote:
>> You actually should not even need to rerun cmake, provided you set up catkin 
>> to use the "-GCodeBlocks - Unix Makefiles" generator we need for Qt Creator.
>
> Is that enough? That sounds great. I thought that QtCreator might do some 
> more "magic".

We try very hard to not do any magic, especially not with the build systems! 
Ideally you should be able to open any project using one of the supported build 
systems without any changes and without any special configuration in Qt Creator.

That is one of the reasons why I sometimes joke that "Qt Creator is the best 
IDE for everybody that hates IDEs":-)

> This can be run easily for all packages with `catkin build --force-cmake 
> --cmake-args "-GCodeBlocks - Unix Makefiles"`.

In fact I did
catkin config -DCMAKE_BUILD_TYPE=Release "-GCodeBlocks - Unix Makefiles"

You need to experiment a bit to get the spaces quoted (who puts spaces into 
something that is supposed to be used as a command line argument?!).

> However I noticed that QtCreator currently reruns cmake in any case whenever 
> you open a project. I think this is fine, and that way the user doesn't even 
> have to remember to call `catkin build` with the `"-GCodeBlocks - Unix 
> Makefiles"` argument manually.

I do not know catkin well enough to comment whether or not that is viable.

Qt Creator will rerun cmake though, since it needs to make sure there is no 
stale data in the configuration it reads. Who knows what the user did to the 
project since cmake was last run?

>>> The step that is inconvenient, which I was asking about in this thread, is 
>>> the fact that for each ROS package, you have to manually select the correct 
>>> build directory and Kit when opening the project. Since there can be many 
>>> ROS packages in a workspace (>100), it gets cumbersome. That’s why I am 
>>> looking for a way to generate the project file (CMakeLists.txt.user) from 
>>> command line without user interaction. I want to be able to specify the 
>>> build directory(s), and also the configuration(s)/Kit(s). For the latter it 
>>> would be great if there was a “environment Kit”, which selects 
>>> compiler/qmake/cmake in the same way that cmake would on the command line 
>>> (in fact cmake has already been run from the initial `catkin build` call, 
>>> so QtCreator could just ask cmake what compiler it configured, which would 
>>> maybe be a sort of “cmake Kit”, where you let cmake run in the current 
>>> environment determine the compiler).
>>
>> My original idea was to use the default build directory setting 
>> (Tools>Options>Build & Run>General IIRC) and adapt that for catkin use. 
>> Opening the source directory should then automatically pick up the right 
>> build directory.
>
> Your idea is to determine if the opened CMakeLists.txt file corresponds to a 
> catkin package, and if yes, use some special logic to determine the correct 
> build directory? This could be the perfect solution, I like it.

Even simpler: My idea was to just configure the default build directory for all 
projects to point to wherever catkin will put its build directories. At this 
point I am mostly thinking about how you can configure Qt Creator to make 
things more convenient for you right now (or soon, since I assume you will be 
using Qt Creator 4.0 for the better cmake experience;-).



> This is only a rough sketch, but I think using catkin itself to find the 
> correct folders could be a robust solution. I can certainly help with 
> figuring out the details and edge cases, and also extending `catkin locate` 
> to provide all the informaton we need.

Sure, something like that would be best. But that of course requires somebody 
that knows those tools well to actually implement this:-)


>> For Qt Creator 4.1 I would like to have a "import existing build" 
>> functionality
>
> This sounds perfect. I think this could be the last piece of the puzzle to 
> achieve what I had originally intended. :)
>
> How would this work with configurations (Release / Debug / ...). At least 
> with the Makefile backend, a given build directory that you import would 
> correspond to exactly one configuration, namely the one that CMAKE_BUILD_TYPE 
> is set to. Would you then simply only offer this one configuration for that 
> project, or offer to create additional build directories for the other 
> configurations?

I want to generalize the code and reuse as much as possible from the qmake 
implementation. There we basically use the default build directory as 
configured by the user for the kits, go up one level and scan all the folders 
found in that directory. If a directory is found, then all the checkboxes for 
build configurations are unchecked, the existing directories are shown under 
the kit they use (with kits being set up for builds that do not match any 
existing kit) and all these directories are checked.

So all the configurations should be found (provided yo

Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Nikolaus Demmel
Sorry for the previous HTML contaminated email! I blame it on my hoster’s 
webmail client. Now I’m back at my machine. Here it comes again hopefully just 
plaintext:



Hi Tobias,

On 31.03.2016, at 12:16, Hunger Tobias  wrote:

> 
>> The catkin_tools workflow is currently supported quite well with qtcreator, 
>> given that catkin_tools creates more-or-less standard cmake build 
>> directories, one for each ROS package. So go ahead in your new ROS workspace 
>> after calling `catkin build`, open the CMakeLists.txt of one of the ROS 
>> packages in QtCreator as a project, then select one configuration and point 
>> the build directory to /build/. Now you can call make 
>> from within QtCreator, rerun cmake, have code completion, click on warnings 
>> to get to the source location, use the debugger, etc. That is all great.
> 
> You actually should not even need to rerun cmake, provided you set up catkin 
> to use the "-GCodeBlocks - Unix Makefiles" generator we need for Qt Creator. 

Is that enough? That sounds great. I thought that QtCreator might do some more 
"magic".

This can be run easily for all packages with `catkin build --force-cmake 
--cmake-args "-GCodeBlocks - Unix Makefiles"`. However I noticed that QtCreator 
currently reruns cmake in any case whenever you open a project. I think this is 
fine, and that way the user doesn't even have to remember to call `catkin 
build` with the `"-GCodeBlocks - Unix Makefiles"` argument manually.

> 
>> The step that is inconvenient, which I was asking about in this thread, is 
>> the fact that for each ROS package, you have to manually select the correct 
>> build directory and Kit when opening the project. Since there can be many 
>> ROS packages in a workspace (>100), it gets cumbersome. That’s why I am 
>> looking for a way to generate the project file (CMakeLists.txt.user) from 
>> command line without user interaction. I want to be able to specify the 
>> build directory(s), and also the configuration(s)/Kit(s). For the latter it 
>> would be great if there was a “environment Kit”, which selects 
>> compiler/qmake/cmake in the same way that cmake would on the command line 
>> (in fact cmake has already been run from the initial `catkin build` call, so 
>> QtCreator could just ask cmake what compiler it configured, which would 
>> maybe be a sort of “cmake Kit”, where you let cmake run in the current 
>> environment determine the compiler).
> 
> My original idea was to use the default build directory setting 
> (Tools>Options>Build & Run>General IIRC) and adapt that for catkin use. 
> Opening the source directory should then automatically pick up the right 
> build directory.

Your idea is to determine if the opened CMakeLists.txt file corresponds to a 
catkin package, and if yes, use some special logic to determine the correct 
build directory? This could be the perfect solution, I like it.

> I am not sure this is an option anymore, considering that there are way more 
> directories in $WS/build than there are in $WS/src. I need to check how that 
> mapping from $WS/src/something/other/CMakeLists.txt to 
> $WS/build/somedirectory works to check if that is an option. 
> If"somedirectory" is just the CMake project name, then that should be easily 
> doable already. Considering that such a simplistic mapping would fail in fun 
> ways when you end up with two projects in $WS/src/* sharing the same project 
> name (but in a different filesystem location), I do not think that is what 
> catkin actually does:-)

It might actually be even easier than you think. Bear with me :-).

First, let me explain shortly what is the layout. In the src directory, there 
might be arbitrarily many catkin packages, at an arbitrary depth in the file 
tree and are identified by the presence of a `package.xml` manifest file. This 
file also specifies the name of the catkin package, i.e. the folder name 
containing the catkin package in the source space is not relevant. One reason 
why allowing packages ot be nested in the folder subtree of the src directory 
is important is because often we want to create one git repository with 
multiple catkin packages in subfolders, and then clone that repo alongside 
other repositories into the src of our workspace. Now in the build directory, 
all the top-level folders correspond to the catkin package names, so the folder 
layout can be much different. Having multiple packages of the same name in a 
catkin workspace is an error, so we don't have to worry about that. And yes, 
the cmake project name is also supposed to match the catkin package name.

But maybe you don't have to worry about any of that :-). catkin_tools comes 
with some built-in commands to query information about the workspace and about 
packages, meant exactly for tool-support.

For example, to determine if the current directory is inside a catkin workspace 
you can run

catkin locate

and it will either print the workspace-root or give you an error.

Then for example to

Re: [Qt-creator] HowTo start Qt Linguist from External Tools with english language instead of current locale

2016-03-31 Thread ekke
Am 31.03.16 um 18:49 schrieb Cristian Adam:
> Simply rename / delete linguist_de.qm from Qt5's translations directory.
>
> When the file is not found it falls back to English.
cool
this nice trick does it :)

ciao

ekke
>
> Cheers,
> Cristian.
>
> On Thu, Mar 31, 2016 at 6:04 PM, ekke  > wrote:
>
> I added an entry in QtCreator External Tools to start Qt Linguist from
> there.
> works well.
>
> But QtLinguist start with german locale which is my current locale
> from OSX.
>
> I prefer to use IDE's in english
> In Qt Creator I can set the language, but I don't know HowTo
> change the
> language to en in Linguist -
> probably adding something to 'arguments' in external tools
> didn't found a hint in the docs
>
> thx helping
>
> ekke
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org 
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
>

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Nikolaus Demmel

Hi Tobias,Hunger Tobias  hat am 31. März 2016 um 12:16 geschrieben:The catkin_tools workflow is currently supported quite well with qtcreator, given that catkin_tools creates more-or-less standard cmake build directories, one for each ROS package. So go ahead in your new ROS workspace after calling `catkin build`, open the CMakeLists.txt of one of the ROS packages in QtCreator as a project, then select one configuration and point the build directory to /build/. Now you can call make from within QtCreator, rerun cmake, have code completion, click on warnings to get to the source location, use the debugger, etc. That is all great.You actually should not even need to rerun cmake, provided you set up catkin to use the "-GCodeBlocks - Unix Makefiles" generator we need for Qt Creator. Is that enough? That sounds great. I thought that QtCreator might do some more "magic".This can be run easily for all packages with `catkin build --force-cmake --cmake-args "-GCodeBlocks - Unix Makefiles"`. However I noticed that QtCreator currently reruns cmake in any case whenever you open a project. I think this is fine, and that way the user doesn't even have to remember to call `catkin build` with the `"-GCodeBlocks - Unix Makefiles"` argument manually.The step that is inconvenient, which I was asking about in this thread, is the fact that for each ROS package, you have to manually select the correct build directory and Kit when opening the project. Since there can be many ROS packages in a workspace (>100), it gets cumbersome. That’s why I am looking for a way to generate the project file (CMakeLists.txt.user) from command line without user interaction. I want to be able to specify the build directory(s), and also the configuration(s)/Kit(s). For the latter it would be great if there was a “environment Kit”, which selects compiler/qmake/cmake in the same way that cmake would on the command line (in fact cmake has already been run from the initial `catkin build` call, so QtCreator could just ask cmake what compiler it configured, which would maybe be a sort of “cmake Kit”, where you let cmake run in the current environment determine the compiler).My original idea was to use the default build directory setting (Tools>Options>Build & Run>General IIRC) and adapt that for catkin use. Opening the source directory should then automatically pick up the right build directory. Your idea is to determine if the opened CMakeLists.txt file corresponds to a catkin package, and if yes, use some special logic to determine the correct build directory? This could be the perfect solution, I like it.I am not sure this is an option anymore, considering that there are way more directories in $WS/build than there are in $WS/src. I need to check how that mapping from $WS/src/something/other/CMakeLists.txt to $WS/build/somedirectory works to check if that is an option. If"somedirectory" is just the CMake project name, then that should be easily doable already. Considering that such a simplistic mapping would fail in fun ways when you end up with two projects in $WS/src/* sharing the same project name (but in a different filesystem location), I do not think that is what catkin actually does:-)It might actually be even easier than you think. Bear with me :-).First, let me explain shortly what is the layout. In the src directory, there might be arbitrarily many catkin packages, at an arbitrary depth in the file tree and are identified by the presence of a `package.xml` manifest file. This file also specifies the name of the catkin package, i.e. the folder name containing the catkin package in the source space is not relevant. One reason why allowing packages ot be nested in the folder subtree of the src directory is important is because often we want to create one git repository with multiple catkin packages in subfolders, and then clone that repo alongside other repositories into the src of our workspace. Now in the build directory, all the top-level folders correspond to the catkin package names, so the folder layout can be much different. Having multiple packages of the same name in a catkin workspace is an error, so we don't have to worry about that. And yes, the cmake project name is also supposed to match the catkin package name.But maybe you don't have to worry about any of that :-). catkin_tools comes with some built-in commands to query information about the workspace and about packages, meant exactly for tool-support.For example, to determine if the current directory is inside a catkin workspace you can run    catkin locateand it will either print the workspace-root or give you an error.Then for example to find the build directory of a package foo_pkg, you just run    catkin locate foo_pkg --buildThis even works together with profiles (which are is catkin's support for multiple configurations in the same workspace), so you can query the build directory of a package for each of the profiles (or to keep it simply initially, just for the currentl

Re: [Qt-creator] HowTo start Qt Linguist from External Tools with english language instead of current locale

2016-03-31 Thread Cristian Adam
Simply rename / delete linguist_de.qm from Qt5's translations directory.

When the file is not found it falls back to English.

Cheers,
Cristian.

On Thu, Mar 31, 2016 at 6:04 PM, ekke  wrote:

> I added an entry in QtCreator External Tools to start Qt Linguist from
> there.
> works well.
>
> But QtLinguist start with german locale which is my current locale from
> OSX.
>
> I prefer to use IDE's in english
> In Qt Creator I can set the language, but I don't know HowTo change the
> language to en in Linguist -
> probably adding something to 'arguments' in external tools
> didn't found a hint in the docs
>
> thx helping
>
> ekke
> ___
> Qt-creator mailing list
> Qt-creator@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


[Qt-creator] HowTo start Qt Linguist from External Tools with english language instead of current locale

2016-03-31 Thread ekke
I added an entry in QtCreator External Tools to start Qt Linguist from
there.
works well.

But QtLinguist start with german locale which is my current locale from OSX.

I prefer to use IDE's in english
In Qt Creator I can set the language, but I don't know HowTo change the
language to en in Linguist -
probably adding something to 'arguments' in external tools
didn't found a hint in the docs

thx helping

ekke
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Hunger Tobias
Hi Nikolaus,

On Thu, Mar 31, 2016 at 9:59 AM, Nikolaus Demmel  
wrote:
> Hi Tobias,
>
> thanks for trying it out.
>
> I think I made the wrong impression of what feature I am actually asking. It 
> should be much simpler. :-)

I agree, it should be simpler.

> The catkin_tools workflow is currently supported quite well with qtcreator, 
> given that catkin_tools creates more-or-less standard cmake build 
> directories, one for each ROS package. So go ahead in your new ROS workspace 
> after calling `catkin build`, open the CMakeLists.txt of one of the ROS 
> packages in QtCreator as a project, then select one configuration and point 
> the build directory to /build/. Now you can call make 
> from within QtCreator, rerun cmake, have code completion, click on warnings 
> to get to the source location, use the debugger, etc. That is all great.

You actually should not even need to rerun cmake, provided you set up catkin to 
use the "-GCodeBlocks - Unix Makefiles" generator we need for Qt Creator. 

> The step that is inconvenient, which I was asking about in this thread, is 
> the fact that for each ROS package, you have to manually select the correct 
> build directory and Kit when opening the project. Since there can be many ROS 
> packages in a workspace (>100), it gets cumbersome. That’s why I am looking 
> for a way to generate the project file (CMakeLists.txt.user) from command 
> line without user interaction. I want to be able to specify the build 
> directory(s), and also the configuration(s)/Kit(s). For the latter it would 
> be great if there was a “environment Kit”, which selects compiler/qmake/cmake 
> in the same way that cmake would on the command line (in fact cmake has 
> already been run from the initial `catkin build` call, so QtCreator could 
> just ask cmake what compiler it configured, which would maybe be a sort of 
> “cmake Kit”, where you let cmake run in the current environment determine the 
> compiler).

My original idea was to use the default build directory setting 
(Tools>Options>Build & Run>General IIRC) and adapt that for catkin use. Opening 
the source directory should then automatically pick up the right build 
directory. I am not sure this is an option anymore, considering that there are 
way more directories in $WS/build than there are in $WS/src. I need to check 
how that mapping from $WS/src/something/other/CMakeLists.txt to 
$WS/build/somedirectory works to check if that is an option. If"somedirectory" 
is just the CMake project name, then that should be easily doable already. 
Considering that such a simplistic mapping would fail in fun ways when you end 
up with two projects in $WS/src/* sharing the same project name (but in a 
different filesystem location), I do not think that is what catkin actually 
does:-)

You would still need to set up the kits yourself then (we need the information 
there for the code model).

For Qt Creator 4.1 I would like to have a "import existing build" functionality 
(as we have for qmake-based projects), which will pick a kit based on an 
existing build directory (and create a new kit if none matches). That requires 
quite a bit of refactoring of the qmake import functionality so that I can 
re-use (part of) the code from there. That is why this did not make the cut for 
Qt Creator 4.0: It was just too late to start a big refactoring when I got 
round to implement that.

> Of course one could also think about integrating catkin_tools itself better 
> into QtCreator (which is I think what you were talking about), but that is a 
> completely different story and to me catkin_tools is so great from the 
> command line, that I am happy continue using it there in conjunction with 
> editing code in an IDE.

Oh, OK:-)

Best Regards,
Tobias

--
Tobias Hunger, Senior Software Engineer | The Qt Company

The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja Sitz der 
Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator


Re: [Qt-creator] Generating QtCreator cmake project for given CMakeLists.txt from command line

2016-03-31 Thread Nikolaus Demmel
Hi Tobias,

thanks for trying it out.

I think I made the wrong impression of what feature I am actually asking. It 
should be much simpler. :-)

The catkin_tools workflow is currently supported quite well with qtcreator, 
given that catkin_tools creates more-or-less standard cmake build directories, 
one for each ROS package. So go ahead in your new ROS workspace after calling 
`catkin build`, open the CMakeLists.txt of one of the ROS packages in QtCreator 
as a project, then select one configuration and point the build directory to 
/build/. Now you can call make from within QtCreator, 
rerun cmake, have code completion, click on warnings to get to the source 
location, use the debugger, etc. That is all great.

The step that is inconvenient, which I was asking about in this thread, is the 
fact that for each ROS package, you have to manually select the correct build 
directory and Kit when opening the project. Since there can be many ROS 
packages in a workspace (>100), it gets cumbersome. That’s why I am looking for 
a way to generate the project file (CMakeLists.txt.user) from command line 
without user interaction. I want to be able to specify the build directory(s), 
and also the configuration(s)/Kit(s). For the latter it would be great if there 
was a “environment Kit”, which selects compiler/qmake/cmake in the same way 
that cmake would on the command line (in fact cmake has already been run from 
the initial `catkin build` call, so QtCreator could just ask cmake what 
compiler it configured, which would maybe be a sort of “cmake Kit”, where you 
let cmake run in the current environment determine the compiler).

Of course one could also think about integrating catkin_tools itself better 
into QtCreator (which is I think what you were talking about), but that is a 
completely different story and to me catkin_tools is so great from the command 
line, that I am happy continue using it there in conjunction with editing code 
in an IDE.

Best,
Nikolaus


On 30.03.2016, at 10:52, Tobias Hunger  wrote:

> Hi Nikolaus,
> 
> Thanks for the instructions! I just managed to do a successful catkin
> build (outside of Qt Creator for now:-)
> 
> My first impression is that it will be tricky to fully integrate the
> catkin_tools workflow, even simple things like figuring out how to map
> source and build directories or even find the full path to files that
> compiler warnings are about. I will need to poke around a bit before I
> dare to make suggestions on how to support this though.
> 
> Best Regards,
> Tobias
> 
> On Tue, Mar 29, 2016 at 4:06 AM, Nikolaus Demmel
>  wrote:
>> Hi Tobias,
>> 
>> thanks for your reply.
>> 
>>> do you have an easy to follow guide to set up some demo project for ROS? I
>>> have been trying to test ROS projects for a while now, but so far failed
>>> most of the time with setting up everything so that I could build some
>>> not-too-simple project that I can test Qt Creator and ROS together.
>> 
>> I never used Arch Linux before, but I came up with this tutorial that should 
>> get you started with a catkin workspace of 77 ros-core packages from source: 
>> https://gist.github.com/NikolausDemmel/aeea157e00b2520aedee
>> 
>> Note that if you just want to test catkin itself, there is actually no need 
>> to install all the ROS packages. You just would need a few of the python 
>> dependencies, and then create a workspace with catkin and some test 
>> packages. But you wanted a not-too-simple setup, so here you go :-).
>> 
>> It is maybe worth reiterating that I am talking about the catkin_tools 
>> workflow. There is also catkin_make, which has a different approach in that 
>> it adds a top-level CMakeLists.txt to your workspace and builds all packages 
>> in one giant CMake project. This makes QtCreator integration easier, since 
>> there is just one project to import with one build directory. But the 
>> catkin-tools workflow has many advantages and is meant to eventually replace 
>> catkin_make as the default workflow: 
>> https://github.com/catkin/catkin_tools/issues/90
>> 
>>> I did fix some bugs with ROS and Qt Creator already, but so far have not
>>> had the opportunity to test the whole workflow myself.
>> 
>> Yeah I noticed things getting smoother over time. Thanks! With 3.6.1 I 
>> actually sill have an issue where `include_directories` is not properly 
>> propagated to the code-model such that QtCreator does not find include 
>> files. This is in conjunction with catkin. But I haven’t had that issue in 
>> 4.0 yet, so I stopped to investigate.
>> 
>> Cheers,
>> Niko
>> 
>> P.S.: For your reference, there seem to also be people wanting a feature 
>> like this outside of ROS: http://stackoverflow.com/q/3898763/1813258
>> 

___
Qt-creator mailing list
Qt-creator@qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator