Am 06.09.2012 15:33, schrieb Brad King:
On 09/06/2012 09:11 AM, Michael Stürmer wrote:
Ok, it was easier than I feared. COMPILE_FLAGS_<CONFIG>  works now for me
with VS 2010 (and makefiles as well I hope, did not test that one so
far). I'm not yet sure if I enhance it to<LANG>_FLAGS_<CONFIG>  but this
will do for me for now.

Thanks for working on this.

I found a feature request from some years ago dealing with this:

http://public.kitware.com/Bug/view.php?id=6493

If I find the time to add documentation and Tests in future I will
upload this. If someone is just interested in getting the patches, email me.

One problem with the COMPILE_FLAGS setting is for historical
reasons it is just treated as a string to be dumped on the
final command line.  If any non-trivial characters are needed
it is up to the user to do the escaping right for each platform.

Please see these comments in that issue:

  http://www.cmake.org/Bug/view.php?id=6493#c13821
  http://www.cmake.org/Bug/view.php?id=6493#c21559

The idea is to instead add new settings

  COMPILE_OPTIONS
  COMPILE_OPTIONS_<CONFIG>

that are semicolon-separated lists of raw options.  CMake will
handle escaping them for the final command line.  The linked topic
that I started is pretty old now but should be a good reference.

Thanks,
-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


I will keep this in mind and in case I'll find time to continue on that I will switch to the proposed compile options.

regards,
Michael

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to