From: Evan Shelhamer Date: Wed, 12 Feb 2014 03:55:41 +0000 (-0800) Subject: add CXXFLAGS for libstdc++ on OS X 10.9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4a0a6fcc2628150ddb847215355bd934c6162c3;p=platform%2Fupstream%2Fcaffe.git add CXXFLAGS for libstdc++ on OS X 10.9 --- diff --git a/Makefile b/Makefile index e3496ea..d058257 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ mat: init $(STATIC_NAME) $(MAT$(PROJECT)_SRC) @echo $(NAME): init $(PROTO_OBJS) $(OBJS) - $(CXX) -shared -o $(NAME) $(OBJS) $(LDFLAGS) $(WARNINGS) + $(CXX) -shared -o $(NAME) $(OBJS) $(CXXFLAGS) $(LDFLAGS) $(WARNINGS) @echo $(STATIC_NAME): init $(PROTO_OBJS) $(OBJS) @@ -132,10 +132,10 @@ runtest: test for testbin in $(TEST_BINS); do $$testbin $(TEST_GPUID); done $(TEST_BINS): %.testbin : %.o $(GTEST_OBJ) $(STATIC_NAME) $(TEST_HDRS) - $(CXX) $< $(GTEST_OBJ) $(STATIC_NAME) -o $@ $(LDFLAGS) $(WARNINGS) + $(CXX) $< $(GTEST_OBJ) $(STATIC_NAME) -o $@ $(CXXFLAGS) $(LDFLAGS) $(WARNINGS) $(EXAMPLE_BINS): %.bin : %.o $(STATIC_NAME) - $(CXX) $< $(STATIC_NAME) -o $@ $(LDFLAGS) $(WARNINGS) + $(CXX) $< $(STATIC_NAME) -o $@ $(CXXFLAGS) $(LDFLAGS) $(WARNINGS) @echo $(OBJS): $(PROTO_GEN_CC) $(HXX_SRCS) diff --git a/Makefile.config.example b/Makefile.config.example index dd5b236..fe117b7 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -27,6 +27,8 @@ LIBRARY_DIRS := $(PYTHON_LIB) /usr/lib /usr/local/lib # For OS X, use clang++. CXX=/usr/bin/g++ +# For OS X 10.9, use libstdc++ instead of libc++ for CUDA compatibility. +#CXXFLAGS=-stdlib=libstdc++ BUILD_DIR=build DISTRIBUTE_DIR=distribute