[cmake-developers] Should compile/link options be user-ordered?

Brad King brad.king at kitware.com
Mon Feb 3 14:41:00 EST 2014


On 02/03/2014 02:37 PM, Stephen Kelly wrote:
> That's if it makes sense to handle it. I suppose there may be some flag for 
> which
> 
>  target_compile_options(tgt -flag)
> 
>  # ... elsewhere:
>  target_compile_options(tgt BEFORE -otherflag)
> 
> makes sense? I don't think it makes sense with -O2, -O3 for example.

Since these are sometimes last-wins options the order can matter.
It's not a big deal either way because someone can always manipulate
the property value directly to change the order.  I have no preference.

-Brad




More information about the cmake-developers mailing list