diff --git a/Makefile b/Makefile index 6cae34dbb..903439e4c 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ ifndef CXXFLAGS endif ifeq (g++, $(findstring g++,$(CXX))) - override CXXFLAGS += -std=gnu++0x + override CXXFLAGS += -std=gnu++0x -pipe else ifeq (clang++, $(findstring clang++,$(CXX))) override CXXFLAGS += -std=c++0x else ifeq ($(CXX), c++) diff --git a/cmake/compileroptions.cmake b/cmake/compileroptions.cmake index aac8eb2ea..ddb16bd00 100644 --- a/cmake/compileroptions.cmake +++ b/cmake/compileroptions.cmake @@ -46,6 +46,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # use pipes instead of temporary files - greatly reduces I/O usage + add_compile_options(-pipe) + add_compile_options(-Woverloaded-virtual) # when a function declaration hides virtual functions from a base class add_compile_options(-Wno-maybe-uninitialized) # there are some false positives add_compile_options(-Wsuggest-attribute=noreturn) diff --git a/tools/dmake.cpp b/tools/dmake.cpp index e3932cc0f..218e5e8e6 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -374,7 +374,7 @@ int main(int argc, char **argv) } fout << "ifeq (g++, $(findstring g++,$(CXX)))\n" - << " override CXXFLAGS += -std=gnu++0x\n" + << " override CXXFLAGS += -std=gnu++0x -pipe\n" << "else ifeq (clang++, $(findstring clang++,$(CXX)))\n" << " override CXXFLAGS += -std=c++0x\n" << "else ifeq ($(CXX), c++)\n"