specify `-pipe` for GCC to use pipes instead of temporary files - greatly reduces I/O usage (#4360)
This commit is contained in:
parent
3dc2c0bd42
commit
32c0167eab
2
Makefile
2
Makefile
|
@ -102,7 +102,7 @@ ifndef CXXFLAGS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (g++, $(findstring g++,$(CXX)))
|
ifeq (g++, $(findstring g++,$(CXX)))
|
||||||
override CXXFLAGS += -std=gnu++0x
|
override CXXFLAGS += -std=gnu++0x -pipe
|
||||||
else ifeq (clang++, $(findstring clang++,$(CXX)))
|
else ifeq (clang++, $(findstring clang++,$(CXX)))
|
||||||
override CXXFLAGS += -std=c++0x
|
override CXXFLAGS += -std=c++0x
|
||||||
else ifeq ($(CXX), c++)
|
else ifeq ($(CXX), c++)
|
||||||
|
|
|
@ -46,6 +46,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
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(-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(-Wno-maybe-uninitialized) # there are some false positives
|
||||||
add_compile_options(-Wsuggest-attribute=noreturn)
|
add_compile_options(-Wsuggest-attribute=noreturn)
|
||||||
|
|
|
@ -374,7 +374,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
fout << "ifeq (g++, $(findstring g++,$(CXX)))\n"
|
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"
|
<< "else ifeq (clang++, $(findstring clang++,$(CXX)))\n"
|
||||||
<< " override CXXFLAGS += -std=c++0x\n"
|
<< " override CXXFLAGS += -std=c++0x\n"
|
||||||
<< "else ifeq ($(CXX), c++)\n"
|
<< "else ifeq ($(CXX), c++)\n"
|
||||||
|
|
Loading…
Reference in New Issue