Fixes vs10 Bug 3100062 uses premake.config.isdebugbuild to determine debug status
This commit is contained in:
parent
ea39872952
commit
e89e0eb8e7
@ -28,7 +28,7 @@
|
||||
* Bug 3015312: Makefiles are not quoted correctly
|
||||
* Bug 3097868: Patch 3076517 premake_rev465.patch. Removes relative paths from vs2010 filters (Robert Konrad)
|
||||
* Bug 3095274: vs2010 PCH implemented and has the same behaviour as previous VS versions
|
||||
|
||||
* Bug 3100062: vs2010 Runtime library selection
|
||||
-------
|
||||
4.2.1
|
||||
-------
|
||||
|
@ -224,10 +224,10 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
|
||||
local function runtime(cfg)
|
||||
local runtime
|
||||
if cfg.flags.StaticRuntime then
|
||||
runtime = iif(cfg.flags.Symbols,"MultiThreadedDebug","MultiThreaded")
|
||||
if premake.config.isdebugbuild(cfg) then
|
||||
runtime = iif(cfg.flags.StaticRuntime,"MultiThreadedDebug", "MultiThreadedDebugDLL")
|
||||
else
|
||||
runtime = iif(cfg.flags.Symbols, "MultiThreadedDebugDLL", "MultiThreadedDLL")
|
||||
runtime = iif(cfg.flags.StaticRuntime, "MultiThreaded", "MultiThreadedDLL")
|
||||
end
|
||||
return runtime
|
||||
end
|
||||
@ -321,6 +321,7 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function debug_info(cfg)
|
||||
--
|
||||
-- EditAndContinue /ZI
|
||||
@ -645,9 +646,7 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
vs10_helpers.sort_input_files(cfg.files,sorted)
|
||||
|
||||
io.eol = "\r\n"
|
||||
--_p('<?xml version="1.0" encoding="utf-8"?>')
|
||||
_p(xml_version_and_encoding)
|
||||
--_p('<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">')
|
||||
_p('<Project ' ..tool_version_and_xmlns ..'>')
|
||||
write_filter_includes(sorted)
|
||||
write_file_filter_block(sorted.ClInclude,"ClInclude")
|
||||
@ -659,9 +658,7 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
|
||||
function premake.vs2010_vcxproj(prj)
|
||||
io.eol = "\r\n"
|
||||
--_p('<?xml version="1.0" encoding="utf-8"?>')
|
||||
_p(xml_version_and_encoding)
|
||||
--_p('<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">')
|
||||
_p('<Project DefaultTargets="Build" ' ..tool_version_and_xmlns ..'>')
|
||||
vs2010_config(prj)
|
||||
vs2010_globals(prj)
|
||||
@ -697,9 +694,7 @@ local vs10_helpers = premake.vstudio.vs10_helpers
|
||||
|
||||
|
||||
function premake.vs2010_vcxproj_user(prj)
|
||||
--_p('<?xml version="1.0" encoding="utf-8"?>')
|
||||
_p(xml_version_and_encoding)
|
||||
--_p('<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">')
|
||||
_p('<Project ' ..tool_version_and_xmlns ..'>')
|
||||
_p('</Project>')
|
||||
end
|
||||
|
@ -142,41 +142,33 @@ function vs10_flags.optimizeSpeed_optimization_setToMaxSpeed()
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<Optimization>Full</Optimization>')
|
||||
end
|
||||
|
||||
function vs10_flags.noStaticRuntime_runtimeLibrary_setToMultiThreadedDLL()
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
--[[
|
||||
function vs10_flags.symbols_runtimeLibrary_setToMultiThreadedDebugDLL()
|
||||
flags {"Symbols"}
|
||||
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>')
|
||||
end
|
||||
--]]
|
||||
|
||||
function vs10_flags.noStaticRuntimeYetSymbols_runtimeLibrary_setToMultiThreadedDebugDLL()
|
||||
flags {"Symbols"}
|
||||
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.staticRuntime_runtimeLibrary_setToMultiThreaded()
|
||||
flags {"StaticRuntime"}
|
||||
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreaded</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.staticRuntimeAndSymbols_runtimeLibrary_setToMultiThreadedDebug()
|
||||
flags {"StaticRuntime","Symbols"}
|
||||
|
||||
buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
|
||||
local debug_string = "Symbols"
|
||||
local release_string = "Optimize"
|
||||
function vs10_flags.debugHasNoStaticRuntime_runtimeLibrary_setToMultiThreadedDebugDLL()
|
||||
flags {debug_string}
|
||||
local buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.debugAndStaticRuntime_runtimeLibrary_setToMultiThreadedDebug()
|
||||
flags {debug_string,"StaticRuntime"}
|
||||
local buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.releaseHasNoStaticRuntime_runtimeLibrary_setToMultiThreadedDLL()
|
||||
flags {release_string}
|
||||
local buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.releaseAndStaticRuntime_runtimeLibrary_setToMultiThreaded()
|
||||
flags {release_string,"StaticRuntime"}
|
||||
local buffer = get_buffer()
|
||||
test.string_contains(buffer,'<RuntimeLibrary>MultiThreaded</RuntimeLibrary>')
|
||||
end
|
||||
|
||||
function vs10_flags.noCharacterSetDefine_characterSet_setToMultiByte()
|
||||
buffer = get_buffer()
|
||||
|
Loading…
Reference in New Issue
Block a user