Notes |
|
(0020850)
|
Fraser Hutchison
|
2010-05-28 00:05
|
|
The uploaded patch works for me on Win 7 with MSVC 2008 Express. I don't have access to MSVC 6 or 10 so I haven't amended cmLocalVisualStudio6Generator.cxx or cmVisualStudio10TargetGenerator.cxx.
Please look at the 2nd and 3rd changes I made to cmLocalGenerator.cxx; these aren't related to this feature request, but looked like bugs me. If I'm wrong, then my 1st change in this file is probably wrong too :-)
Also in cmLocalGenerator.cxx at the same places, it looks like per-config LINK_FLAGS are only considered if LINK_FLAGS is not empty. I matched this behaviour in my patch, but I'm not sure this is desired behaviour - should per-config flags not be added regardless of defining universal flags? |
|
|
(0020853)
|
Brad King
|
2010-05-28 08:27
|
|
The references to LINK_FLAGS and STATIC_LINK_FLAGS in cmLocalGenerator.cxx are not used in any real generators and need not be updated for this change. They are left from an experimental feature that was never finished AFAIK. If the code were actually used then the bugs you spotted would be real bugs. As a separate task I may look at removing this whole chunk of code for cleanup purposes.
I have changes almost ready for all generators. Unfortunately this is very hard to test because there is no link flag that will be accepted by all linkers. Therefore any test needs to be customized for each platform :( |
|
|
(0020855)
|
Fraser Hutchison
|
2010-05-28 08:40
|
|
The joys of cross-platform testing :-)
Lemme know if I can help - I've only got access to MSVC 2008 on Win 7 or Xp, and CodeBlocks on Win7, Xp, Ubuntu and Fedora.
My gmail address is fraser.hutchison |
|
|
(0020858)
|
Brad King
|
2010-05-28 11:35
|
|
I decided to test this by adding bogus flags and regex-matching the errors in the output.
I've published a series of four commits to fix up LINK_FLAGS_<CONFIG>, test LINK_FLAGS and STATIC_LIBRARY_FLAGS, and add support for STATIC_LIBRARY_FLAGS_<CONFIG>. The topic has been merged into next:
http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=be834bac [^] |
|
|
(0020859)
|
Brad King
|
2010-05-28 13:33
|
|
|
|
(0020860)
|
Fraser Hutchison
|
2010-05-28 14:30
|
|
Great!
Thanks for implementing this so quickly. |
|
|
(0020936)
|
Brad King
|
2010-06-07 16:15
|
|
This topic has been merged to 'master' for inclusion in the next release. |
|