dmake: force-add -std=c++0x if we compile with g++ or clang++
This commit is contained in:
parent
f92c448d6e
commit
11915f84e2
8
Makefile
8
Makefile
|
@ -80,7 +80,13 @@ ifeq ($(CXX), clang++)
|
|||
CPPCHK_GLIBCXX_DEBUG=
|
||||
endif
|
||||
ifndef CXXFLAGS
|
||||
CXXFLAGS=-std=c++0x -include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare $(CPPCHK_GLIBCXX_DEBUG) -g
|
||||
CXXFLAGS=-include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare $(CPPCHK_GLIBCXX_DEBUG) -g
|
||||
endif
|
||||
|
||||
ifeq ($(CXX), g++)
|
||||
override CXXFLAGS += -std=c++0x
|
||||
else ifeq ($(CXX), clang++)
|
||||
override CXXFLAGS += -std=c++0x
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RULES),yes)
|
||||
|
|
|
@ -328,7 +328,6 @@ int main(int argc, char **argv)
|
|||
// -Wsign-conversion : too many warnings
|
||||
// -Wunreachable-code : some GCC versions report lots of warnings
|
||||
makeConditionalVariable(fout, "CXXFLAGS",
|
||||
"-std=c++0x "
|
||||
"-include lib/cxx11emu.h "
|
||||
"-pedantic "
|
||||
"-Wall "
|
||||
|
@ -356,6 +355,13 @@ int main(int argc, char **argv)
|
|||
"-g");
|
||||
}
|
||||
|
||||
fout << "ifeq ($(CXX), g++)\n"
|
||||
<< " override CXXFLAGS += -std=c++0x\n"
|
||||
<< "else ifeq ($(CXX), clang++)\n"
|
||||
<< " override CXXFLAGS += -std=c++0x\n"
|
||||
<< "endif\n"
|
||||
<< "\n";
|
||||
|
||||
fout << "ifeq ($(HAVE_RULES),yes)\n"
|
||||
<< " CXXFLAGS += -DHAVE_RULES -DTIXML_USE_STL $(shell pcre-config --cflags)\n"
|
||||
<< " ifdef LIBS\n"
|
||||
|
|
Loading…
Reference in New Issue