Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstarkos <none@none>2009-06-15 22:03:17 +0400
committerstarkos <none@none>2009-06-15 22:03:17 +0400
commitda7732093715f1d18e0a2839281fd18116de4ae2 (patch)
treeffb4a6436dd4ea18add80e314770d65ba84b438e
parent0f0724ca0305ef0409601607140f193248172dca (diff)
Bug 2152526: Code::Blocks doesn't build PCH correctly on GCC
-rw-r--r--CHANGES.txt1
-rw-r--r--samples/project/premake4.lua2
-rw-r--r--src/actions/codeblocks/codeblocks_cbp.lua8
3 files changed, 8 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 2aec368..94a15f3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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
diff --git a/samples/project/premake4.lua b/samples/project/premake4.lua
index 582cec4..a04e981 100644
--- a/samples/project/premake4.lua
+++ b/samples/project/premake4.lua
@@ -1,8 +1,6 @@
solution "PremakeTestbox"
configurations { "Debug", "Release" }
- location "build"
-
-- solution level configuration
configuration "Debug"
diff --git a/src/actions/codeblocks/codeblocks_cbp.lua b/src/actions/codeblocks/codeblocks_cbp.lua
index f58113a..2b9ff5a 100644
--- a/src/actions/codeblocks/codeblocks_cbp.lua
+++ b/src/actions/codeblocks/codeblocks_cbp.lua
@@ -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