File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,13 @@ CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion 2>&1)
7070CXX_MAJOR := $(word 1,$(subst ., ,$(CXX_VERSION)))
7171CXX_MINOR := $(word 2,$(subst ., ,$(CXX_VERSION)))
7272
73+ # disable Make's implicit suffix rules
74+ # see: https://www.gnu.org/software/make/manual/html_node/Implicit-Rules.html
75+ # this should make Make slightly faster, as well as avoiding some unexpected
76+ # behavior when there are other files lying around with the same name as
77+ # Stan models
78+ .SUFFIXES: .cpp
79+
7380################################################################################
7481# Set optional compiler flags for performance
7582#
Original file line number Diff line number Diff line change @@ -252,11 +252,8 @@ endif
252252############################################################
253253# Google Test:
254254# Build the google test library.
255- $(GTEST)/src/gtest-all.o: CXXFLAGS += $(CXXFLAGS_GTEST)
256- $(GTEST)/src/gtest-all.o: CPPFLAGS += $(CPPFLAGS_GTEST)
257- $(GTEST)/src/gtest-all.o: INC += $(INC_GTEST)
258-
259-
255+ $(GTEST)/src/gtest-all.o: $(GTEST)/src/gtest-all.cc
256+ $(COMPILE.cpp) -x c++ $(CXXFLAGS_GTEST) $(CPPFLAGS_GTEST) $(INC_GTEST) -o $@ -c $<
260257
261258############################################################
262259# Clean all libraries
You can’t perform that action at this time.
0 commit comments