From 3ebbe97c2cfdeb2bbbb94e6c17baa35e740df954 Mon Sep 17 00:00:00 2001 From: thomas desveaux Date: Thu, 12 Apr 2018 20:14:57 +0200 Subject: [PATCH] Add test for omitframepointer Default in vstudio + fix omitframepointer Default in vstudio --- .../vstudio/tests/vc2010/test_compile_settings.lua | 12 ++++++++++++ modules/vstudio/vs2010_vcxproj.lua | 8 +++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/modules/vstudio/tests/vc2010/test_compile_settings.lua b/modules/vstudio/tests/vc2010/test_compile_settings.lua index 729cfc48..5cab04fa 100644 --- a/modules/vstudio/tests/vc2010/test_compile_settings.lua +++ b/modules/vstudio/tests/vc2010/test_compile_settings.lua @@ -1260,6 +1260,18 @@ -- Check OmitFramePointer -- + function suite.omitFramePointer_Default() + omitframepointer "Default" + prepare() + test.capture [[ + + NotUsing + Level3 + Disabled + + ]] + end + function suite.omitFramePointer_On() omitframepointer "On" prepare() diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua index dd2684d6..44f8eef9 100644 --- a/modules/vstudio/vs2010_vcxproj.lua +++ b/modules/vstudio/vs2010_vcxproj.lua @@ -2153,9 +2153,11 @@ function m.omitFramePointers(cfg) - if cfg.omitframepointer then - local map = { Off = "false", On = "true" } - m.element("OmitFramePointers", nil, map[cfg.omitframepointer]) + local map = { Off = "false", On = "true" } + local value = map[cfg.omitframepointer] + + if value then + m.element("OmitFramePointers", nil, value) end end