Implementing "allmodulespublic"
This commit is contained in:
parent
59385a2586
commit
d124db636f
@ -57,3 +57,40 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- If AllModulesPublic flag is set, add <AllProjectBMIsArePublic> element (supported from VS2019)
|
||||
--
|
||||
|
||||
function suite.onAllModulesPublicOn()
|
||||
allmodulespublic "On"
|
||||
local cfg = test.getconfig(prj, "Debug", platform)
|
||||
vc2010.outputProperties(cfg)
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\Debug\</OutDir>
|
||||
<IntDir>obj\Debug\</IntDir>
|
||||
<TargetName>MyProject</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<AllProjectBMIsArePublic>true</AllProjectBMIsArePublic>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onAllModulesPublicOff()
|
||||
allmodulespublic "Off"
|
||||
local cfg = test.getconfig(prj, "Debug", platform)
|
||||
vc2010.outputProperties(cfg)
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>bin\Debug\</OutDir>
|
||||
<IntDir>obj\Debug\</IntDir>
|
||||
<TargetName>MyProject</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
<AllProjectBMIsArePublic>false</AllProjectBMIsArePublic>
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
@ -243,6 +243,7 @@
|
||||
m.generateManifest,
|
||||
m.extensionsToDeleteOnClean,
|
||||
m.executablePath,
|
||||
m.allModulesPublic,
|
||||
}
|
||||
end
|
||||
end
|
||||
@ -1506,11 +1507,15 @@
|
||||
function m.conformanceMode(cfg)
|
||||
if _ACTION >= "vs2017" then
|
||||
if cfg.conformancemode ~= nil then
|
||||
if cfg.conformancemode then
|
||||
m.element("ConformanceMode", nil, "true")
|
||||
else
|
||||
m.element("ConformanceMode", nil, "false")
|
||||
end
|
||||
m.element("ConformanceMode", nil, iif(cfg.conformancemode, "true", "false"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function m.allModulesPublic(cfg)
|
||||
if _ACTION >= "vs2019" then
|
||||
if cfg.allmodulespublic ~= nil then
|
||||
m.element("AllProjectBMIsArePublic", nil, iif(cfg.allmodulespublic, "true", "false"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -190,6 +190,12 @@
|
||||
"HeaderUnit"
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "allmodulespublic",
|
||||
scope = "config",
|
||||
kind = "boolean"
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "configmap",
|
||||
|
27
website/docs/allmodulespublic.md
Normal file
27
website/docs/allmodulespublic.md
Normal file
@ -0,0 +1,27 @@
|
||||
allmodulespublic
|
||||
|
||||
```lua
|
||||
allmodulespublic "value"
|
||||
```
|
||||
|
||||
### Parameters ###
|
||||
|
||||
`value` one of:
|
||||
* `On` - All C++ modules in the given project(s) will be public.
|
||||
* `Off` - Not all C++ modules in the given project(s) will be public.
|
||||
|
||||
## Applies To ###
|
||||
|
||||
The `config` scope.
|
||||
|
||||
### Availability ###
|
||||
|
||||
Visual Studio 2019 and later.
|
||||
Premake 5.0-beta2 or later.
|
||||
|
||||
### Examples ###
|
||||
|
||||
```lua
|
||||
allmodulespublic "On"
|
||||
```
|
||||
|
@ -60,6 +60,7 @@ module.exports = {
|
||||
type: 'category',
|
||||
label: 'Project Settings',
|
||||
items: [
|
||||
'allmodulespublic',
|
||||
'androidapilevel',
|
||||
'androidapplibname',
|
||||
'architecture',
|
||||
|
Loading…
Reference in New Issue
Block a user