Manual merge pull request #45 (Oliver Kuckertz)

- Add Maps flag to control generation of maps file for Visual Studio
This commit is contained in:
Jason Perkins 2014-05-01 15:32:50 -04:00
parent 2d8be343b1
commit ae8a1e0cf3
3 changed files with 27 additions and 0 deletions

View File

@ -231,6 +231,7 @@
"FloatStrict", -- DEPRECATED
"LinkTimeOptimization",
"Managed",
"Maps",
"MFC",
"MultiProcessorCompile",
"NativeWChar", -- DEPRECATED

View File

@ -351,6 +351,7 @@
"additionalLibraryDirectories",
"importLibrary",
"entryPointSymbol",
"generateMapFile",
"moduleDefinitionFile",
"treatLinkerWarningAsErrors",
"additionalLinkOptions",
@ -925,6 +926,13 @@
end
function vc2010.generateMapFile(cfg)
if cfg.flags.Maps then
_p(3,'<GenerateMapFile>true</GenerateMapFile>')
end
end
function vc2010.ignoreImportLibrary(cfg)
if cfg.kind == premake.SHAREDLIB and cfg.flags.NoImportLib then
_p(2,'<IgnoreImportLibrary>true</IgnoreImportLibrary>');

View File

@ -425,3 +425,21 @@
</Lib>
]]
end
--
-- Test generating .map files.
--
function suite.suite.generateMapFile_onMapsFlag()
flags { "Maps" }
prepare()
test.capture [[
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ImportLibrary>MyProject.lib</ImportLibrary>
<GenerateMapFile>true</GenerateMapFile>
</Link>
]]
end