mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Bugfix: Support building test_bitcoin with shared-object boost test framework
Conflicts: src/makefile.unix
This commit is contained in:
@@ -16,6 +16,8 @@ ifdef STATIC
|
||||
ifeq (${STATIC}, all)
|
||||
LMODE2 = static
|
||||
endif
|
||||
else
|
||||
TESTDEFS += -DBOOST_TEST_DYN_LINK
|
||||
endif
|
||||
|
||||
# for boost 1.37, add -mt to the boost libraries
|
||||
@@ -140,14 +142,14 @@ bitcoind: $(OBJS:obj/%=obj/nogui/%)
|
||||
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||
|
||||
obj/test/%.o: test/%.cpp
|
||||
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
|
||||
$(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $<
|
||||
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
|
||||
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
|
||||
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
|
||||
rm -f $(@:%.o=%.d)
|
||||
|
||||
test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
|
||||
$(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-Bstatic -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
|
||||
$(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
-rm -f bitcoind test_bitcoin
|
||||
|
||||
Reference in New Issue
Block a user