diff --git a/modules/vstudio/tests/vc2010/test_compile_settings.lua b/modules/vstudio/tests/vc2010/test_compile_settings.lua index cdb7251d..997dcf23 100644 --- a/modules/vstudio/tests/vc2010/test_compile_settings.lua +++ b/modules/vstudio/tests/vc2010/test_compile_settings.lua @@ -1510,3 +1510,42 @@ ]] end + +-- +-- If useFullPaths flag is set, add element +-- + + function suite.onUseFullPathsOff() + usefullpaths "Off" + prepare() + test.capture [[ + + NotUsing + Level3 + Disabled + false + ]] + end + + function suite.onUseFullPathsOn() + usefullpaths "On" + prepare() + test.capture [[ + + NotUsing + Level3 + Disabled + true + ]] + end + + function suite.onUseFullPathsNotSpecified() + prepare() + test.capture [[ + + NotUsing + Level3 + Disabled + + ]] + end \ No newline at end of file diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua index 87259c48..39cdcc85 100644 --- a/modules/vstudio/vs2010_vcxproj.lua +++ b/modules/vstudio/vs2010_vcxproj.lua @@ -385,7 +385,8 @@ m.callingConvention, m.languageStandard, m.conformanceMode, - m.structMemberAlignment + m.structMemberAlignment, + m.useFullPaths } if cfg.kind == p.STATICLIB then @@ -1504,6 +1505,16 @@ end end + function m.useFullPaths(cfg) + if cfg.useFullPaths ~= nil then + if cfg.useFullPaths then + m.element("UseFullPaths", nil, "true") + else + m.element("UseFullPaths", nil, "false") + end + end + end + function m.additionalCompileOptions(cfg, condition) local opts = cfg.buildoptions if _ACTION == "vs2015" or vstudio.isMakefile(cfg) then diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 86e47352..d47aedef 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -789,6 +789,12 @@ kind = "boolean" } + api.register { + name = "usefullpaths", + scope = "config", + kind = "boolean" + } + api.register { name = "swiftversion", scope = "config",