Browse Source

Ensure that g++ knows it is building a PCH (#75)

It seems that g++ 5.4 doesn't realize that it is building a precompiled 
header unless you pass it -x c++-header.
pull/77/head
Ben Gamari 10 years ago
committed by Andrew Waterman
parent
commit
3a7393db14
  1. 2
      Makefile.in

2
Makefile.in

@ -194,7 +194,7 @@ $(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs))
$(2)_deps += $$(patsubst %.o, %.d, $$($(2)_c_objs))
$(2)_deps += $$(patsubst %.h, %.h.d, $$($(2)_precompiled_hdrs))
$$($(2)_pch) : %.h.gch : %.h
$(COMPILE) $$< -o $$@
$(COMPILE) -x c++-header $$< -o $$@
# If using clang, don't depend (and thus don't build) precompiled headers
$$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $(if $(filter-out clang,$(CC)),$$($(2)_pch))
$(COMPILE) -c $$<

Loading…
Cancel
Save