Add force includes for SNC; allow configuration context proxy to be reset by exporter code
This commit is contained in:
parent
89deec0474
commit
80a60231db
@ -208,6 +208,9 @@
|
||||
return premake5.project.getrelative(cfg.project, cfg[key])
|
||||
end
|
||||
return cfg[key]
|
||||
end,
|
||||
__newindex = function(proxy, key, value)
|
||||
cfg[key] = value
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -14,17 +14,7 @@
|
||||
-- SNC flags for specific systems and architectures.
|
||||
--
|
||||
|
||||
snc.sysflags = {
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
-- Retrieve the CPPFLAGS for a specific configuration.
|
||||
--
|
||||
|
||||
function snc.getcppflags(cfg)
|
||||
return { "-MMD", "-MP" }
|
||||
end
|
||||
snc.sysflags = {}
|
||||
|
||||
|
||||
--
|
||||
@ -85,6 +75,7 @@
|
||||
-- These are the same as GCC
|
||||
--
|
||||
|
||||
snc.getcppflags = gcc.getcppflags
|
||||
snc.getdefines = gcc.getdefines
|
||||
snc.getincludedirs = gcc.getincludedirs
|
||||
snc.getlinks = gcc.getlinks
|
||||
|
@ -129,3 +129,13 @@
|
||||
test.isequal({ "generated.o" }, snc.getlinks(cfg))
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check handling of forced includes.
|
||||
--
|
||||
|
||||
function suite.forcedIncludeFiles()
|
||||
forceincludes { "stdafx.h", "include/sys.h" }
|
||||
prepare()
|
||||
test.isequal({"-MMD", "-MP", '-include "stdafx.h"', '-include "include/sys.h"'}, snc.getcppflags(cfg))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user