Merged in stefanc/premake-dev/gmake-parallel-pch (pull request #118)

Fix gmake parallel builds when using precompiled headers
This commit is contained in:
Jason Perkins 2014-07-08 17:32:00 -04:00
commit 3cea3afe1c
3 changed files with 8 additions and 3 deletions

View File

@ -135,6 +135,11 @@
_p('# %s %s makefile autogenerated by Premake', premake.action.current().shortname, kind)
_p('')
if kind == "solution" then
_p('.NOTPARALLEL:')
_p('')
end
make.defaultconfig(target)
_p('ifndef verbose')

View File

@ -453,7 +453,7 @@
function make.pchRules(prj)
_p('ifneq (,$(PCH))')
_p('.NOTPARALLEL: $(GCH) $(PCH)')
_p('$(OBJECTS): $(GCH) $(PCH)')
_p('$(GCH): $(PCH)')
_p('\t@echo $(notdir $<)')

View File

@ -91,7 +91,7 @@
prepareRules()
test.capture [[
ifneq (,$(PCH))
.NOTPARALLEL: $(GCH) $(PCH)
$(OBJECTS): $(GCH) $(PCH)
$(GCH): $(PCH)
@echo $(notdir $<)
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
@ -110,7 +110,7 @@ endif
prepareRules()
test.capture [[
ifneq (,$(PCH))
.NOTPARALLEL: $(GCH) $(PCH)
$(OBJECTS): $(GCH) $(PCH)
$(GCH): $(PCH)
@echo $(notdir $<)
$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"