Added forceusings()
This commit is contained in:
parent
453cae7362
commit
d5e3272957
@ -980,6 +980,10 @@
|
||||
local includes = project.getrelative(cfg.project, cfg.forceincludes)
|
||||
_x(4,'ForcedIncludeFiles="%s"', table.concat(includes, ';'))
|
||||
end
|
||||
if #cfg.forceusings > 0 then
|
||||
local usings = project.getrelative(cfg.project, cfg.forceusings)
|
||||
_x(4,'ForcedUsingFiles="%s"', table.concat(usings, ';'))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -619,6 +619,10 @@
|
||||
local includes = project.getrelative(cfg.project, cfg.forceincludes)
|
||||
_x(3,'<ForcedIncludeFiles>%s</ForcedIncludeFiles>', table.concat(includes, ';'))
|
||||
end
|
||||
if #cfg.forceusings > 0 then
|
||||
local usings = project.getrelative(cfg.project, cfg.forceusings)
|
||||
_x(3,'<ForcedUsingFiles>%s</ForcedUsingFiles>', table.concat(usings, ';'))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -672,6 +672,12 @@
|
||||
kind = "file-list",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "forceusings",
|
||||
scope = "config",
|
||||
kind = "file-list",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "framework",
|
||||
scope = "project",
|
||||
|
@ -462,6 +462,24 @@
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.forcedUsingFiles()
|
||||
forceusings { "stdafx.h", "include/sys.h" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(OutDir)\MyProject.pdb"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="0"
|
||||
ForcedUsingFiles="stdafx.h;include/sys.h"
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Verify handling of the NoRuntimeChecks flag.
|
||||
|
@ -555,6 +555,17 @@
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.forcedUsingFiles()
|
||||
forceusings { "stdafx.h", "include/sys.h" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ForcedUsingFiles>stdafx.h;include/sys.h</ForcedUsingFiles>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check handling of the NoRuntimeChecks flag.
|
||||
|
Loading…
Reference in New Issue
Block a user