[Qt-creator] project file, local defines?
Campbell Barton
ideasman42 at gmail.com
Sat Mar 5 05:01:47 CET 2011
On Fri, Mar 4, 2011 at 7:49 PM, Andre Poenitz
<andre.poenitz at mathematik.tu-chemnitz.de> wrote:
> On Fri, Mar 04, 2011 at 05:41:22PM +0000, Campbell Barton wrote:
>> >> The issue is defines are not global, they are per file though
>> >> per-directory would be good enough for my use.
>> >>
>> >> I was wondering if there was a way to set defines so they are not set
>> >> for the whole project.
>> >
>> > I am not sure I understand the question.
>> >
>> > Would putting the macros an a separate defines.h file and
>> > #include "defines.h" in the interesting files help?
>> >
>> > Andre'
>>
>> This would work but the defines are compile time options which is why
>> they are not in a header, I we could use a config.h method to setup
>> defines but at the moment we don't and its a big enough project that
>> its not simple to make changes like this.
>>
>> The issue is, when you add defines in the *.config file they are
>> defined everywhere as far as qtcreator is concerned, but when being
>> built they are not.
>
> What build system are you using?
>
> Andre'
I'm using CMake, but generating own project files using a small python
scripts, because:
- It includes all source files, not just the ones cmake builds
(important for refactoring so I don't break other OS's)
- It uses defines which are needed in the area I maintain (albeit
global defines at the moment)
bug reported: http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3922
I'd like non-global defines because this is how they are used in
CMake, and Eclipse project files.
--
- Campbell
More information about the Qt-creator-old
mailing list