Bug 2152526: Code::Blocks doesn't build PCH correctly on GCC

This commit is contained in:
starkos 2009-06-15 18:03:17 +00:00
parent b041900f25
commit 1c1ad931b4
3 changed files with 8 additions and 3 deletions

View File

@ -27,6 +27,7 @@ RC2 -> RC3
- Bug 2805763: GCC PCH breaks on path
- Bug 2709641: Location field does not propagate to projects
- Bug 2675518: Dependencies wrong on config links
- Bug 2152526: Code::Blocks doesn't build PCH correctly on GCC
RC1 -> RC2

View File

@ -1,8 +1,6 @@
solution "PremakeTestbox"
configurations { "Debug", "Release" }
location "build"
-- solution level configuration
configuration "Debug"

View File

@ -108,6 +108,11 @@
_p('\t\t</Build>')
-- begin files block --
local pchheader
if (prj.pchheader) then
pchheader = path.getrelative(prj.location, prj.pchheader)
end
for _,fname in ipairs(prj.files) do
_p('\t\t<Unit filename="%s">', premake.esc(fname))
if path.isresourcefile(fname) then
@ -115,10 +120,11 @@
elseif path.iscppfile(fname) then
_p('\t\t\t<Option compilerVar="%s" />', iif(prj.language == "C", "CC", "CPP"))
end
if not prj.flags.NoPCH and fname == prj.pchheader then
if not prj.flags.NoPCH and fname == pchheader then
_p('\t\t\t<Option compilerVar="%s" />', iif(prj.language == "C", "CC", "CPP"))
_p('\t\t\t<Option compile="1" />')
_p('\t\t\t<Option weight="0" />')
_p('\t\t\t<Add option="-x c++-header" />')
end
_p('\t\t</Unit>')
end