Skip to content

Commit

Permalink
update r739
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Nov 7, 2014
1 parent 2be8fa6 commit d134eab
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ install:
# lcov
- if [ "${USE_COVERAGE}" = 'lcov' ]; then sudo apt-get install lcov rubygems; fi
- if [ "${USE_COVERAGE}" = 'lcov' ]; then gem install lcoveralls; fi
# gtest
- if [ "${USE_GTEST}" = '1' ]; then sudo apt-get -qq install cmake; fi
- if [ "${USE_GTEST}" = '1' ]; then sudo apt-get -qq install libgtest-dev; fi
- if [ "${USE_GTEST}" = '1' ]; then cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/; cd -; fi

script:
- cd ./test
Expand Down Expand Up @@ -61,6 +65,8 @@ matrix:
env: USE_FUSE=fuse_min
- compiler: gcc
env: USE_FUSE=fuse_min STDFLAG=-std=c++98
- compiler: gcc
env: USE_GTEST=1
- compiler: gcc
env: COVERITY_SCAN=1
addons:
Expand Down
36 changes: 30 additions & 6 deletions test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,32 @@ build_benchmark:

ifdef USE_GTEST

ifdef GTEST_ROOT

GTEST_ROOT_=$(subst \,/,$(GTEST_ROOT))
GTEST_INC_=-I$(GTEST_ROOT_)/include
#GTEST_LIB_=$(GTEST_ROOT_)/make/gtest.a
GTEST_LIB_=$(GTEST_ROOT_)/make/gtest-all.o

else

GTEST_INC_=
GTEST_LIB_=-lgtest -lpthread

endif

CXXFLAGS += -DIUTEST_USE_GTEST -DIUTEST_HAS_SOCKET=0
GTESTFLAGS=$(GTEST_INC_) $(GTEST_LIB_)


$(BUILD_ONLY) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GTEST_INC_) $(GTEST_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GTESTFLAGS)

$(ALLTESTS_TARGET) : $(ALLTESTS_SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $(ALLTESTS_SRCS) $(GTEST_INC_) $(GTEST_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $(ALLTESTS_SRCS) $(GTESTFLAGS)

$(TARGETS1) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GTEST_INC_) $(GTEST_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GTESTFLAGS)

$(TARGETS2) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GTEST_INC_)
Expand All @@ -251,19 +264,30 @@ else

ifdef USE_GMOCK

ifdef GMOCK_ROOT

GMOCK_ROOT_=$(subst \,/,$(GMOCK_ROOT))
GMOCK_INC_=-I$(GMOCK_ROOT_)/include -I$(GMOCK_ROOT_)/gtest/include
GMOCK_LIB_=$(GMOCK_ROOT_)/make/gmock-all.o $(GMOCK_ROOT_)/make/gtest-all.o

else

GMOCK_INC_=
GMOCK_LIB_=-lgmock -lgtest -lpthread

endif

CXXFLAGS += -DIUTEST_USE_GTEST -DIUTEST_USE_GMOCK -DIUTEST_HAS_SOCKET=0
GMOCKFLAGS=$(GMOCK_INC_) $(GMOCK_LIB_)

$(BUILD_ONLY) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GMOCK_INC_) $(GMOCK_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GMOCKFLAGS)

$(ALLTESTS_TARGET) : $(ALLTESTS_SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $(ALLTESTS_SRCS) $(GMOCK_INC_) $(GMOCK_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $(ALLTESTS_SRCS) $(GMOCKFLAGS)

$(TARGETS1) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GMOCK_INC_) $(GMOCK_LIB_)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GMOCKFLAGS)

$(TARGETS2) : $(SRCS) $(IUTEST_HEADERS) $(MAKEFILE)
$(CXX) $(IUTEST_INCLUDE) $(CXXFLAGS) -o $@ $@.cpp $(GMOCK_INC_)
Expand Down

0 comments on commit d134eab

Please sign in to comment.