[cmake-developers] Fix for Visual Studio /MANIFESTUAC:NO linker option

Eric Berge ericmberge at gmail.com
Wed May 7 14:59:25 EDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140507/80b523bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-Visual-Studio-MANIFESTUAC-NO-linker-option.patch
Type: application/octet-stream
Size: 2755 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140507/80b523bf/attachment.obj>


More information about the cmake-developers mailing list