The attached patch is intended to fix the Visual Studio 2010, 2012,
and 2013 project generation for the /MANIFESTUAC:NO option.  I'd like
to request this for the master branch as well as a 2.X pushback.
(Note that my testing of this was with both the May-07-2014 master
code as well as a patch applied to the v2.8.12.2 tag.)

The assumptions of this change are:

1. That the /MANIFESTUAC:NO linker option should result in the
   EnableUAC attribute being set to "false" and does not require
   the setting of UACUIAccess or UACExecutionLevel attributes (or
   any other attributes) to any particular value.

2. The problem is that the cmVSXXLinkFlagTable entries process
   the /MANIFESTUAC:NO option by matching the following three
   rules in this order:

        {"EnableUAC", "MANIFESTUAC:NO", "", "false",
            cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
        {"EnableUAC", "MANIFESTUAC:NO", "Enable User Account Control
(UAC)", "",
            cmVS7FlagTable::UserValueRequired},
        {"EnableUAC", "MANIFESTUAC:", "", "true",
            cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},

    which results in the EnableUAC attribute being set to "true".

3. There are no versions of /MANIFESTUAC:NO where addition values
   are appended.  This is mentioned because my interpretation of
   the original code was that the cmVSXXLinkFlagTable entries
   for "MANIFESTUAC:NO" where the cmVS7FlagTable::UserValueRequired
   "special" value is set seemed to imply this (although I might
   have been misinterpreting the purpose of these entries).

Based on these, the proposed solution is to remove both of the
MANIFESTUAC:NO entries and replace them with one of the form:

        {"EnableUAC", "MANIFESTUAC:NO", "", "false", 0},

which would set EnableUAC to false and immediately stop processing
the /MANIFESTUAC:NO option.

Eric

Attachment: 0001-Fix-Visual-Studio-MANIFESTUAC-NO-linker-option.patch
Description: Binary data

-- 

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/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to