From 18a4e2d1fc7a269e03be24f3a23bc59bc071a03e Mon Sep 17 00:00:00 2001 From: Evan Shelhamer Date: Thu, 3 Jul 2014 18:15:38 -0700 Subject: [PATCH] customize compiler setting in Makefile.config in case of issues with default compilers or exotic platforms. --- Makefile | 5 +++++ Makefile.config.example | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 6d8cb90..f8abc1b 100644 --- a/Makefile +++ b/Makefile @@ -194,6 +194,11 @@ ifeq ($(OSX), 1) endif endif +# Custom compiler +ifdef CUSTOM_CXX + CXX := $(CUSTOM_CXX) +endif + # Debugging ifeq ($(DEBUG), 1) COMMON_FLAGS := -DDEBUG -g -O0 diff --git a/Makefile.config.example b/Makefile.config.example index 6c3948f..17c9001 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -1,6 +1,10 @@ ## Refer to http://caffe.berkeleyvision.org/installation.html # Contributions simplifying and improving our build system are welcome! +# To customize your choice of compiler, uncomment and set the following. +# N.B. the default for Linux is g++ and the default for OSX is clang++ +# CUSTOM_CXX := g++ + # CUDA directory contains bin/ and lib/ directories that we need. CUDA_DIR := /usr/local/cuda # On Ubuntu 14.04, if cuda tools are installed via -- 2.7.4