Patch 3337372: Improved precompiled header support (Anders Ericsson)
This commit is contained in:
parent
b7fac3f46e
commit
ac6867c35b
@ -26,3 +26,7 @@ Makefile
|
|||||||
*.project
|
*.project
|
||||||
*.tags
|
*.tags
|
||||||
|
|
||||||
|
*.bbprojectsettings
|
||||||
|
Scratchpad.txt
|
||||||
|
Unix Worksheet.worksheet
|
||||||
|
project.bbprojectdata
|
@ -35,6 +35,7 @@
|
|||||||
* Patch 3367641: Remove warnings in Xcode 4
|
* Patch 3367641: Remove warnings in Xcode 4
|
||||||
* Patch 3372345: Gmake action's PCHs don't work with Mingw (Martin Ridgers)
|
* Patch 3372345: Gmake action's PCHs don't work with Mingw (Martin Ridgers)
|
||||||
* Patch 3317329: Support vstudio CompileAs for mixed-language projects (xpol)
|
* Patch 3317329: Support vstudio CompileAs for mixed-language projects (xpol)
|
||||||
|
* Patch 3337372: Improved precompiled header support (Anders Ericsson)
|
||||||
|
|
||||||
|
|
||||||
-------
|
-------
|
||||||
|
@ -268,7 +268,19 @@
|
|||||||
-- Precompiled header support
|
-- Precompiled header support
|
||||||
--
|
--
|
||||||
|
|
||||||
function cpp.pchconfig(cfg)
|
function cpp.pchconfig(cfg)
|
||||||
|
-- GCC needs the full path to the PCH, while Visual Studio needs
|
||||||
|
-- only the name (or rather, the name as specified in the #include
|
||||||
|
-- statement). Try to locate the PCH in the project.
|
||||||
|
local pchheader = cfg.pchheader
|
||||||
|
for _, incdir in ipairs(cfg.includedirs) do
|
||||||
|
local testname = path.join(incdir, cfg.pchheader)
|
||||||
|
if os.isfile(testname) then
|
||||||
|
pchheader = testname
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if not cfg.flags.NoPCH and cfg.pchheader then
|
if not cfg.flags.NoPCH and cfg.pchheader then
|
||||||
_p(' PCH = %s', _MAKE.esc(path.getrelative(cfg.location, cfg.pchheader)))
|
_p(' PCH = %s', _MAKE.esc(path.getrelative(cfg.location, cfg.pchheader)))
|
||||||
_p(' GCH = $(OBJDIR)/%s.gch', _MAKE.esc(path.getname(cfg.pchheader)))
|
_p(' GCH = $(OBJDIR)/%s.gch', _MAKE.esc(path.getname(cfg.pchheader)))
|
||||||
|
@ -154,7 +154,7 @@
|
|||||||
local function precompiled_header(cfg)
|
local function precompiled_header(cfg)
|
||||||
if not cfg.flags.NoPCH and cfg.pchheader then
|
if not cfg.flags.NoPCH and cfg.pchheader then
|
||||||
_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')
|
_p(3,'<PrecompiledHeader>Use</PrecompiledHeader>')
|
||||||
_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', path.getname(cfg.pchheader))
|
_p(3,'<PrecompiledHeaderFile>%s</PrecompiledHeaderFile>', cfg.pchheader)
|
||||||
else
|
else
|
||||||
_p(3,'<PrecompiledHeader></PrecompiledHeader>')
|
_p(3,'<PrecompiledHeader></PrecompiledHeader>')
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user