Commits

tren...@gmail.com  committed 7834b28

* fixed precompiled headers to allow parallel builds

  • Participants
  • Parent commits 9f316e2

Comments (0)

Files changed (1)

File src/actions/make/make_cpp.lua

 		-- C/C++ file
 		if path.iscppfile(node.abspath) then
 			local objectname = project.getfileobject(prj, node.abspath)
-			_p('$(OBJDIR)/%s.o: %s', make.esc(objectname), make.esc(node.relpath))
+			_p('$(OBJDIR)/%s.o: %s $(GCH)', make.esc(objectname), make.esc(node.relpath))
 			_p('\t@echo $(notdir $<)')
 			cpp.buildcommand(prj, "o", node)
 
 			local pch = make.esc(project.getrelative(cfg.project, pchheader))
 			_p('  PCH        = %s', make.esc(project.getrelative(cfg.project, pchheader)))
 			_p('  GCH        = $(OBJDIR)/%s.gch', gch)
-			_p('  CPPFLAGS  += -I$(OBJDIR) -include %s', pch)
+			_p('  CPPFLAGS  += -I$(OBJDIR)', pch)
 		end
 	end
 
 	function cpp.pchrules(prj)
 		_p('ifneq (,$(PCH))')
 		_p('$(GCH): $(PCH)')
-		_p('\t@echo $(notdir $<)')
-		_p('ifeq (posix,$(SHELLTYPE))')
-		_p('\t-$(SILENT) cp $< $(OBJDIR)')
-		_p('else')
-		_p('\t$(SILENT) xcopy /D /Y /Q "$(subst /,\\,$<)" "$(subst /,\\,$(OBJDIR))" 1>nul')
-		_p('endif')
 		cpp.buildcommand(prj, "gch")
 		_p('endif')
 		_p('')