On 09/09/2014 11:02 AM, Bach, Pascal wrote: > I don't understand the purpose of the flag tables [1]. > Aren't they there to map from command line to XML files?
Yes, but they were created originally to support flags specified by users in CMAKE_C_FLAGS and a few other places. > 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). This is done for a subset of the sources of flags, specifically those settable by users and project code. We can't use a complete command line like that in CMAKE_${lang}_CREATE_SHARED_LIBRARY because that will contain a lot of pieces besides the flags. Also multi-configuration is an issue as you point out. You would need to create new variables in Windows-MSVC to hold the flags to be scanned by the VS generators. Then re-use the flags in constructing the other rule variables with command-lines used by the Makefile and Ninja generators. -Brad -- 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