diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 775b568e..6e7654bf 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -234,6 +234,13 @@ } + api.register { + name = "editAndContinue", + scope = "config", + kind = "boolean", + } + + -- For backward compatibility, excludes() is now an alias for removefiles() function excludes(value) removefiles(value) @@ -285,7 +292,7 @@ "NativeWChar", -- DEPRECATED "No64BitChecks", "NoCopyLocal", - "NoEditAndContinue", + "NoEditAndContinue", -- DEPRECATED "NoExceptions", "NoFramePointer", "NoImplicitLink", @@ -847,6 +854,17 @@ warnings "Default" end) + -- 10 Nov 2014 + + api.deprecateValue("flags", "NoEditAndContinue", nil, + function(value) + editAndContinue "Off" + end, + function(value) + editAndContinue "On" + end) + + ----------------------------------------------------------------------------- -- @@ -947,6 +965,8 @@ -- ----------------------------------------------------------------------------- + editAndContinue "On" + -- Setting a default language makes some validation easier later language "C++" diff --git a/src/actions/vstudio/vs200x_vcproj.lua b/src/actions/vstudio/vs200x_vcproj.lua index d5be822b..c03743fc 100644 --- a/src/actions/vstudio/vs200x_vcproj.lua +++ b/src/actions/vstudio/vs200x_vcproj.lua @@ -749,7 +749,7 @@ return 1 else -- Edit-and-continue doesn't work for some configurations - if cfg.flags.NoEditAndContinue or + if not cfg.editAndContinue or config.isOptimizedBuild(cfg) or cfg.flags.Managed or cfg.system == "x64" diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 19af8ca3..c7540240 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -994,7 +994,7 @@ elseif cfg.architecture == "x64" or cfg.flags.Managed or config.isOptimizedBuild(cfg) or - cfg.flags.NoEditAndContinue + not cfg.editAndContinue then value = "ProgramDatabase" else diff --git a/tests/actions/vstudio/vc2010/test_compile_settings.lua b/tests/actions/vstudio/vc2010/test_compile_settings.lua index 11956fb4..f6e174f7 100644 --- a/tests/actions/vstudio/vc2010/test_compile_settings.lua +++ b/tests/actions/vstudio/vc2010/test_compile_settings.lua @@ -569,11 +569,12 @@ -- --- Check the handling of the NoEditAndContinue flag. +-- Check the handling of the editAndContinue flag. -- - function suite.debugFormat_onNoEditAndContinue() - flags { "Symbols", "NoEditAndContinue" } + function suite.debugFormat_onEditAndContinueOff() + flags { "Symbols" } + editAndContinue "Off" prepare() test.capture [[