Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions make/compiler_flags
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion 2>&1)
CXX_MAJOR := $(word 1,$(subst ., ,$(CXX_VERSION)))
CXX_MINOR := $(word 2,$(subst ., ,$(CXX_VERSION)))

# disable Make's implicit suffix rules
# see: https://www.gnu.org/software/make/manual/html_node/Implicit-Rules.html
# this should make Make slightly faster, as well as avoiding some unexpected
# behavior when there are other files lying around with the same name as
# Stan models
.SUFFIXES: .cpp

################################################################################
# Set optional compiler flags for performance
#
Expand Down
7 changes: 2 additions & 5 deletions make/libraries
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,8 @@ endif
############################################################
# Google Test:
# Build the google test library.
$(GTEST)/src/gtest-all.o: CXXFLAGS += $(CXXFLAGS_GTEST)
$(GTEST)/src/gtest-all.o: CPPFLAGS += $(CPPFLAGS_GTEST)
$(GTEST)/src/gtest-all.o: INC += $(INC_GTEST)


$(GTEST)/src/gtest-all.o: $(GTEST)/src/gtest-all.cc
$(COMPILE.cpp) -x c++ $(CXXFLAGS_GTEST) $(CPPFLAGS_GTEST) $(INC_GTEST) -o $@ -c $<

############################################################
# Clean all libraries
Expand Down