[CMake] Setting COMPILE_FLAGS property on a target in only debug?

Robert Dailey rcdailey.lists at gmail.com
Mon May 7 15:07:01 EDT 2012


On Mon, May 7, 2012 at 12:42 PM, Stephen Kelly <steveire at gmail.com> wrote:

> Robert Dailey wrote:
>
> > On Mon, May 7, 2012 at 10:37 AM, Robert Dailey
> > <rcdailey.lists at gmail.com>wrote:
> >
> > I just tried your workaround and it does not work. It places everything
> in
> > my preprocessor definitions field, not actually on the command line.
> >
> > I'm going to desperately need configuration-aware COMPILE_FLAGS, because
> > in Visual Studio, I have cache variables that enable certain features,
> > like edit & continue, minimal rebuild, etc... features that are not
> > compatible with /O2 (optimizations on). Since CMake has no choice but to
> > enable these MSVC features in all configurations, my release builds don't
> > work, and the user will be required to disable these features via cache
> > variable every time they want to build release, which is unnecessary.
> >
> > If no one has the bandwidth to take up this feature I suppose I could
> look
> > into it. Anyone have any tips on how to implement this before I dive into
> > the CMake code?
>
> If I've  understood you I think the solution to a super-set of your problem
> is already under discussion:
>
> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/3615


This looks like an interesting discussion but seems like it would be a lot
of work to complete. You're really targetting this for 2.8.9? I haven't
seen any input from Bill or David on this, I'd like to read what they have
to say.

Slightly unrelated observation, but the target_use_package() description in
the wiki linked to by your discussion thread doesn't make any sense to me.
Also what do you mean by "porcelain API"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120507/1f3bd1a6/attachment.htm>


More information about the CMake mailing list