Re: [CMake] Using two sets of compiler flags in same build

2012-04-18 Thread Petr Kmoch
Hi Andre, I can think of two ways. One is using target properties COMPILE_FLAGS and COMPILE_DEFINITIONS to setup flags on a per-target basis. Unfortunately, there's no per-config version of those :-( Another is to separate your targets into directories added by add_subdirectory(). I believe you

Re: [CMake] Using two sets of compiler flags in same build

2012-04-18 Thread André Caron
Hi Petr, I've indeed done some more reading and figured out I could move the different targets in two sibling sub-directories. In retrospect, this seems kind of obvious, but the whole variable inheritance thing is not the most prominent part of the documentation... Anyways, I've implemented it

[CMake] Using two sets of compiler flags in same build

2012-04-17 Thread André Caron
Hi all, I've posted this issue on StackOverflow[1] and have not yet received a suitable response, so I thought I'd ask here instead. Basically, I need to have a single build that uses two sets of compiler flags.  One set is used to build native windows applications, and the other to build a