Skip to content

Commit

Permalink
fix utest build failed for osx.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Nov 5, 2015
1 parent 38b81ce commit 98e25de
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion trunk/auto/utest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ SRS_TRUNK_PREFIX=../..
# gest dir, relative to objs/utest, it's trunk/objs/gtest
GTEST_DIR=${SRS_TRUNK_PREFIX}/${SRS_OBJS_DIR}/gtest

# the extra defines to compile utest.
EXTRA_DEFINES=""

# for osx to disable the error.
# gtest/include/gtest/internal/gtest-port.h:499:13: fatal error: 'tr1/tuple' file not found
if [ $SRS_OSX = YES ]; then
EXTRA_DEFINES="$EXTRA_DEFINES -DGTEST_HAS_TR1_TUPLE=0"
fi

cat << END > ${FILE}
# user must run make the ${SRS_OBJS_DIR}/utest dir
# at the same dir of Makefile.
Expand Down Expand Up @@ -49,7 +58,7 @@ USER_DIR = .
CPPFLAGS += -I\$(GTEST_DIR)/include
# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -O0
CXXFLAGS += -g -Wall -Wextra -O0 ${EXTRA_DEFINES}
# All tests produced by this Makefile. Remember to add new tests you
# created to the list.
Expand Down

0 comments on commit 98e25de

Please sign in to comment.