customize compiler setting in Makefile.config
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 4 Jul 2014 01:15:38 +0000 (18:15 -0700)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Fri, 4 Jul 2014 01:38:30 +0000 (18:38 -0700)
in case of issues with default compilers or exotic platforms.

Makefile
Makefile.config.example

index 6d8cb90..f8abc1b 100644 (file)
--- 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
index 6c3948f..17c9001 100644 (file)
@@ -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