View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014282CMakeCMakepublic2013-07-09 06:312013-12-02 08:51
ReporterSoeren Textor 
Assigned ToBrad King 
PriorityhighSeveritytrivialReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWindowsOS VersionWindows 7
Product VersionCMake 2.8.11.2 
Target VersionCMake 2.8.12Fixed in VersionCMake 2.8.12 
Summary0014282: false '/MAP' link flag interpretation
DescriptionIt seems that the vs studio generators for VS2010/2011/2012 are buggy.

If you add a map file via link flags to the project there is a dditional needless':'-character. Maybe the regular expresseion has an error
Steps To Reproduce  SET_TARGET_PROPERTIES( project PROPERTIES LINK_FLAGS -MAP:mymapfile.map )

or

  SET_TARGET_PROPERTIES( project PROPERTIES LINK_FLAGS /MAP:mymapfile.map )

results in following vcxproj entry:

  <MapFileName>:MAP:mymapfile.map</MapFileName>

which leads to compile errors in VS2012
Additional InformationHere you can find the official explanation about the map link flag:

http://msdn.microsoft.com/en-us/library/k7xkk3e2(v=vs.110).aspx [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033515)
Soeren Textor (reporter)
2013-07-09 06:32

typo! it results in:

<MapFileName>:mymapfile.map</MapFileName>
(0033516)
Brad King (manager)
2013-07-09 08:52

Try this patch (untested):

diff --git a/Source/cmVS10LinkFlagTable.h b/Source/cmVS10LinkFlagTable.h
index 64febbb..d133dc2 100644
--- a/Source/cmVS10LinkFlagTable.h
+++ b/Source/cmVS10LinkFlagTable.h
@@ -199,9 +199,9 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
   {"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", 
"",
    cmVS7FlagTable::UserValueRequired},
-  {"GenerateMapFile", "MAP", "", "true",
+  {"GenerateMapFile", "MAP:", "", "true",
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
-  {"MapFileName", "MAP", "Generate Map File", "",
+  {"MapFileName", "MAP:", "Generate Map File", "",
    cmVS7FlagTable::UserValueRequired},
 
   //String List Properties
diff --git a/Source/cmVS11LinkFlagTable.h b/Source/cmVS11LinkFlagTable.h
index ea0d0f0..fb19425 100644
--- a/Source/cmVS11LinkFlagTable.h
+++ b/Source/cmVS11LinkFlagTable.h
@@ -225,9 +225,9 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] =
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
   {"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", 
"",
    cmVS7FlagTable::UserValueRequired},
-  {"GenerateMapFile", "MAP", "", "true",
+  {"GenerateMapFile", "MAP:", "", "true",
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
-  {"MapFileName", "MAP", "Generate Map File", "",
+  {"MapFileName", "MAP:", "Generate Map File", "",
    cmVS7FlagTable::UserValueRequired},
 
   //String List Properties
diff --git a/Source/cmVS12LinkFlagTable.h b/Source/cmVS12LinkFlagTable.h
index ce32e38..31b79ff 100644
--- a/Source/cmVS12LinkFlagTable.h
+++ b/Source/cmVS12LinkFlagTable.h
@@ -225,9 +225,9 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] =
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
   {"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", 
"",
    cmVS7FlagTable::UserValueRequired},
-  {"GenerateMapFile", "MAP", "", "true",
+  {"GenerateMapFile", "MAP:", "", "true",
    cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
-  {"MapFileName", "MAP", "Generate Map File", "",
+  {"MapFileName", "MAP:", "Generate Map File", "",
    cmVS7FlagTable::UserValueRequired},
 
   //String List Properties
(0033517)
Brad King (manager)
2013-07-09 08:57

Well, the patch in 0014282:0033516 may fix the "/MAP:value" form but will break the plain "/MAP" form of the option. This flag is different from any other we've seen in that it can appear with or without the ":". Do you know of others like that?
(0033521)
Soeren Textor (reporter)
2013-07-09 10:47

Unfortunately there are plenty of them (source: http://msdn.microsoft.com/en-us/library/y0zzbyt4(v=vs.71).aspx [^]):

/ALIGN[:number] http://msdn.microsoft.com/en-us/library/8xx65e1y(v=vs.71).aspx [^]
/ALLOWBIND[:NO] http://msdn.microsoft.com/en-us/library/hsa130k8(v=vs.71).aspx [^]
/ASSEMBLYDEBUG[:DISABLE] http://msdn.microsoft.com/en-us/library/cta4x5hc(v=vs.71).aspx [^]
/DELAYSIGN[:NO] http://msdn.microsoft.com/en-us/library/bk4wd6yz(v=vs.71).aspx [^]
/DRIVER[:UPONLY | :WDM] http://msdn.microsoft.com/en-us/library/43a6z8s4(v=vs.71).aspx [^]
/EXETYPE[:DYNAMIC | :DEV386] http://msdn.microsoft.com/en-us/library/aa984740(v=vs.71).aspx [^]
/FIXED[:NO] http://msdn.microsoft.com/en-us/library/w368ysh2(v=vs.71).aspx [^]
/INCREMENTAL[:NO] http://msdn.microsoft.com/en-us/library/w368ysh2(v=vs.71).aspx [^]
/LARGEADDRESSAWARE[:NO] http://msdn.microsoft.com/en-us/library/wz223b1z(v=vs.71).aspx [^]
/LTCG[:NOSTATUS|:STATUS] http://msdn.microsoft.com/en-us/library/xbf3tbeh(v=vs.71).aspx [^]
/NODEFAULTLIB[:library] http://msdn.microsoft.com/en-us/library/3tz4da4a(v=vs.71).aspx [^]
/SAFESEH[:NO] http://msdn.microsoft.com/en-us/library/9a89h429(v=vs.71).aspx [^]
/TSAWARE[:NO] http://msdn.microsoft.com/en-us/library/01cfys9z(v=vs.71).aspx [^]
/VERBOSE[:LIB | SAFESEH] http://msdn.microsoft.com/en-us/library/wdsk6as6(v=vs.71).aspx [^]
(0033522)
Brad King (manager)
2013-07-09 14:12

After digging deeper the second part of my comment in 0014282:0033517 was incorrect and the patch from 0014282:0033516 was almost correct. I forgot that we handle cases like this with two mappings (one for the flag regardless of value, and the other for the flag with a value). We are simply missing the ":" from the latter half of that for MAP. This should fix it:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2caf795 [^]
(0034640)
Robert Maynard (manager)
2013-12-02 08:51

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-07-09 06:31 Soeren Textor New Issue
2013-07-09 06:32 Soeren Textor Note Added: 0033515
2013-07-09 08:52 Brad King Note Added: 0033516
2013-07-09 08:57 Brad King Note Added: 0033517
2013-07-09 10:47 Soeren Textor Note Added: 0033521
2013-07-09 14:12 Brad King Note Added: 0033522
2013-07-09 14:13 Brad King Assigned To => Brad King
2013-07-09 14:13 Brad King Status new => resolved
2013-07-09 14:13 Brad King Resolution open => fixed
2013-07-09 14:13 Brad King Fixed in Version => CMake 2.8.12
2013-07-09 14:13 Brad King Target Version => CMake 2.8.12
2013-12-02 08:51 Robert Maynard Note Added: 0034640
2013-12-02 08:51 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team