Skip to content

Commit

Permalink
Invert test library order
Browse files Browse the repository at this point in the history
The libraries on the left may know about and use libraries on the right. With the opposite order, potentially there can be unresolved symbols, as the library they should be found in has already been processed.
  • Loading branch information
DanRStevens committed Jan 3, 2025
1 parent 9aa8bb9 commit e8304ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ TESTOBJS := $(patsubst $(TESTDIR)/%.cpp,$(TESTINTDIR)/%.o,$(TESTSRCS))

TESTCPPFLAGS := $(CPPFLAGS) -I./
TESTLDFLAGS := $(LDFLAGS)
TESTLIBS := -lgtest -lgmock -lgmock_main -lpthread $(LDLIBS)
TESTLIBS := -lgmock_main -lgmock -lgtest -lpthread $(LDLIBS)

TESTPROJECT_FLAGS = $(TESTCPPFLAGS) $(CXXFLAGS)
TESTPROJECT_LINKFLAGS = $(TESTLDFLAGS) $(TESTLIBS)
Expand Down

0 comments on commit e8304ae

Please sign in to comment.