Add a new "ScanForModuleDependencies" flag.
This controls the Visual Studio "Scan Sources for Module Dependencies" option, which controls how it scans for C++20 modules. This new flag sets the option in the generated project files.
This commit is contained in:
parent
a3afc7b378
commit
408a927dde
@ -397,6 +397,7 @@
|
||||
m.compileAsWinRT,
|
||||
m.externalWarningLevel,
|
||||
m.externalAngleBrackets,
|
||||
m.scanSourceForModuleDependencies,
|
||||
}
|
||||
|
||||
if cfg.kind == p.STATICLIB then
|
||||
@ -2873,6 +2874,15 @@
|
||||
end
|
||||
|
||||
|
||||
function m.scanSourceForModuleDependencies(cfg)
|
||||
if _ACTION >= "vs2019" then
|
||||
if cfg.flags.ScanForModuleDependencies then
|
||||
m.element("ScanSourceForModuleDependencies", nil, "true")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function m.xmlDeclaration()
|
||||
p.xmlUtf8()
|
||||
end
|
||||
|
@ -520,6 +520,7 @@
|
||||
"OptimizeSpeed", -- DEPRECATED
|
||||
"RelativeLinks",
|
||||
"ReleaseRuntime", -- DEPRECATED
|
||||
"ScanForModuleDependencies",
|
||||
"ShadowedVariables",
|
||||
"StaticRuntime", -- DEPRECATED
|
||||
"Symbols", -- DEPRECATED
|
||||
|
@ -31,6 +31,7 @@ flags { "flag_list" }
|
||||
| NoRuntimeChecks | Disable Visual Studio's [default stack frame and uninitialized variable checks][2] on debug builds. |
|
||||
| OmitDefaultLibrary | Omit the specification of a runtime library in object files. |
|
||||
| RelativeLinks | Forces the linker to use relative paths to libraries instead of absolute paths. |
|
||||
| ScanForModuleDependencies | Enables the Visual Studio `Scan Sources for Module Dependencies` feature for C++20 modules. | Valid for vs2019 and newer. |
|
||||
| ShadowedVariables | Warn when a variable, type declaration, or function is shadowed. |
|
||||
| StaticRuntime | Perform a static link against the standard runtime libraries. | Deprecated - use staticruntime "On" instead. |
|
||||
| UndefinedIdentifiers | Warn if an undefined identifier is evaluated in an #if directive. |
|
||||
|
Reference in New Issue
Block a user