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('# %s %s makefile autogenerated by Premake', premake.action.current().shortname, kind)
_p('') _p('')
if kind == "solution" then
_p('.NOTPARALLEL:')
_p('')
end
make.defaultconfig(target) make.defaultconfig(target)
_p('ifndef verbose') _p('ifndef verbose')

View File

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

View File

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