From ae8a1e0cf31f456271a7972b89d06962905c0280 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Thu, 1 May 2014 15:32:50 -0400 Subject: [PATCH] Manual merge pull request #45 (Oliver Kuckertz) - Add Maps flag to control generation of maps file for Visual Studio --- src/_premake_init.lua | 1 + src/actions/vstudio/vs2010_vcxproj.lua | 8 ++++++++ tests/actions/vstudio/vc2010/test_link.lua | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/src/_premake_init.lua b/src/_premake_init.lua index a16e03f3..fb4ca63c 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -231,6 +231,7 @@ "FloatStrict", -- DEPRECATED "LinkTimeOptimization", "Managed", + "Maps", "MFC", "MultiProcessorCompile", "NativeWChar", -- DEPRECATED diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index e1d08fe0..018b66d6 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -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,'true') + end + end + + function vc2010.ignoreImportLibrary(cfg) if cfg.kind == premake.SHAREDLIB and cfg.flags.NoImportLib then _p(2,'true'); diff --git a/tests/actions/vstudio/vc2010/test_link.lua b/tests/actions/vstudio/vc2010/test_link.lua index 763a7492..fb7da0cd 100644 --- a/tests/actions/vstudio/vc2010/test_link.lua +++ b/tests/actions/vstudio/vc2010/test_link.lua @@ -425,3 +425,21 @@ ]] end + + +-- +-- Test generating .map files. +-- + + function suite.suite.generateMapFile_onMapsFlag() + flags { "Maps" } + prepare() + test.capture [[ + + Windows + false + MyProject.lib + true + + ]] + end