[*] project names containing hyphens will screw with the macro preprocessor in vs (and other compilers. msvc compiles, vs doesnt like it, other compilers will probably complain)
This commit is contained in:
parent
8059031835
commit
66b3281934
@ -141,8 +141,6 @@ function JsonProcessor(info)
|
||||
|
||||
_G["info"] = info
|
||||
|
||||
local loadstring = loadstring or load
|
||||
|
||||
if (_if) then
|
||||
local val = eval("return " .. _if)
|
||||
if (not val) then
|
||||
@ -328,8 +326,10 @@ function JsonProcessor(info)
|
||||
|
||||
local iface = proj.processor
|
||||
|
||||
local macro = ("_auhas_" .. dep):upper():gsub("%-", "_");
|
||||
|
||||
if (isProjectLoaded(dep)) then
|
||||
defines(("_auhas_" .. dep):upper() .. "=1")
|
||||
defines(macro .. "=1")
|
||||
|
||||
iface:handleReference(isWeakCircularReference(dep))
|
||||
|
||||
@ -337,7 +337,7 @@ function JsonProcessor(info)
|
||||
iface:handleLink()
|
||||
end
|
||||
else
|
||||
defines(("_auhas_" .. dep):upper() .. "=0")
|
||||
defines(macro .. "=0")
|
||||
if (not soft) then
|
||||
fatal("missing project: ", dep)
|
||||
end
|
||||
|
@ -270,9 +270,6 @@ function attemptNS(ns)
|
||||
attemptLoad = true
|
||||
end
|
||||
|
||||
-- this seems to be singleshot.
|
||||
-- once you switch namespaces, theres no going back, it seems.
|
||||
-- we try to preserve namespace-project contiguity as much as possible through sorting and evil recursion
|
||||
group(ns)
|
||||
return attemptLoad
|
||||
end
|
||||
@ -289,17 +286,21 @@ function processProject(name, required, noNs)
|
||||
end
|
||||
end
|
||||
|
||||
-- ensure the project is initializd
|
||||
processInit(a)
|
||||
|
||||
-- legacy recursion
|
||||
if (projectsblocked[name]) then
|
||||
return true
|
||||
end
|
||||
|
||||
projectsblocked[name] = name
|
||||
|
||||
-- process all within the namespace before processing the actual project
|
||||
local ns = a.info.namespace
|
||||
local loadOthers = attemptNS(ns)
|
||||
|
||||
-- {
|
||||
local cwd = os.getcwd()
|
||||
local old = _G["current_project"]
|
||||
|
||||
@ -310,9 +311,11 @@ function processProject(name, required, noNs)
|
||||
|
||||
os.chdir(cwd)
|
||||
_G["current_project"] = old
|
||||
-- }
|
||||
|
||||
projectsemitted[name] = name
|
||||
|
||||
-- cont
|
||||
if (loadOthers) then
|
||||
namespacesemitted[ns] = "";
|
||||
processNS(ns)
|
||||
|
Loading…
Reference in New Issue
Block a user