Disabling clang C++11 warnings -


i cannot life of me clang stop warning me c++11 extensions. anywhere use "auto" or other c++11 extension spits out warning.

i have flag -wno-c++11-extension still prints them.

here's makefile:

cxx = clang++ cxxflags = -std=c++11 -wall -wno-c++11-extensions libs = -lglfw -lgl -lglu -lglew  obj_dir = bin lib_dir = -l/usr/lib inc_dir = -i/usr/include  source = $(wildcard *.cpp) objects = ${source:%.cpp=$(obj_dir)/%.o} executable = vox args = -w1024 -h800  .phony: init clean  all: init $(objects) $(executable)  $(executable): $(objects)     $(cxx) $(cxxflags) $(lib_dir) -o $@ $(objects) $(libs)  $(obj_dir)/%.o: %.cpp     $(cxx) $(inc_dir) -c $< -g -o $@   run: init $(executable)     @echo $(ls . | grep *.cpp)     @./$(executable) $(args)  init:     @mkdir -p "$(obj_dir)"  clean:     @rm -rf $(obj_dir) $(executable) 

here's clang++ --version output

ubuntu clang version 3.2-1~exp5ubuntu1~precise1 (tags/release_32/final) (based on llvm 3.2) target: x86_64-pc-linux-gnu thread model: posix 

you need pass compiler options compilation step well:

$(obj_dir)/%.o: %.cpp     $(cxx) $(cxxflags) $(inc_dir) -c $< -g -o $@  #          ^^^^^^^^^^^ 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -