> On 09/09/2014 10:19 AM, Bach, Pascal wrote:
> > Wouldn't it make sense to use the same variables in the VS10+ Generator
> too?
> > It seems redundant to have the same information again. What's the reason
> it is hardcoded?
> 
> That's just the way it was written.  The rule variables like
> CMAKE_${lang}_CREATE_SHARED_LIBRARY contain command lines in
> which the Makefile and Ninja generators substitute for some
> placeholders.  The VS generators do not have a command line
> because they just put the declarative information into the
> project file and let VS build the command line.

I don't understand the purpose of the flag tables [1]. Aren't they there to map 
from command line to XML files?
At first I tought the way things work was:
Windows-MSVC.cmake and Co construct a commandline with the required flags. ==> 
The VS generator parses this command line and uses the cmVS7FlagTable to 
translate the known flags to XML elements. (Unknown arguments get passed as 
additional arguments).

But it might be that this doesn't work because multi configuration or something 
else.

[1] 
https://github.com/Kitware/CMake/blob/6ae98ee18f6c35b93556a66dc0ce909d84aec18b/Source/cmVS10LinkFlagTable.h
> 
> If you want to refactor things to create more independent
> flag-holding variables that are used to construct
> CMAKE_${lang}_CREATE_SHARED_LIBRARY and also read by the
> VS generators and sent through the flag map, that's fine
> with me.  Please also update the VS 7-9 generators to use
> the same information variables if possible.

If I refactor I would change it to the way described above.

Pascal
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to