Merge pull request #1570 from hannes-harnisch/master
Initial C++20 module support for Visual Studio
This commit is contained in:
commit
23f32c2759
@ -1180,6 +1180,45 @@
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onCompileAsCppModule()
|
||||
compileas 'Module'
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<CompileAs>CompileAsCppModule</CompileAs>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onCompileAsCppModulePartition()
|
||||
compileas 'ModulePartition'
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<CompileAs>CompileAsCppModuleInternalPartition</CompileAs>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onCompileAsCppHeaderUnit()
|
||||
compileas 'HeaderUnit'
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<CompileAs>CompileAsHeaderUnit</CompileAs>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check handling of the C++14 & C++17 api
|
||||
|
@ -1699,6 +1699,12 @@
|
||||
m.element("CompileAs", condition, "CompileAsC")
|
||||
elseif p.languages.iscpp(cfg.compileas) then
|
||||
m.element("CompileAs", condition, "CompileAsCpp")
|
||||
elseif cfg.compileas == "Module" then
|
||||
m.element("CompileAs", condition, "CompileAsCppModule")
|
||||
elseif cfg.compileas == "ModulePartition" then
|
||||
m.element("CompileAs", condition, "CompileAsCppModuleInternalPartition")
|
||||
elseif cfg.compileas == "HeaderUnit" then
|
||||
m.element("CompileAs", condition, "CompileAsHeaderUnit")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -185,6 +185,9 @@
|
||||
"C++",
|
||||
"Objective-C",
|
||||
"Objective-C++",
|
||||
"Module",
|
||||
"ModulePartition",
|
||||
"HeaderUnit"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user