1036 1007 only enable cpp11 in Makefile_io_src when needed (#1052)

Enable c++11 flag only on GCC < 6. Also enable c++14 if Clang is being used.
This commit is contained in:
Scott Fennell 2020-09-09 01:43:32 -05:00 committed by GitHub
parent 892c0ac493
commit c9f060c94f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,10 +420,16 @@ void PrintAttributes::printIOMakefile() {
makefile_io_src.open("build/Makefile_io_src") ;
makefile_io_src
<< "TRICK_IO_CXXFLAGS += -std=c++11 -Wno-invalid-offsetof -Wno-old-style-cast -Wno-write-strings -Wno-unused-variable" << std::endl
<< "TRICK_IO_CXXFLAGS += -Wno-invalid-offsetof -Wno-old-style-cast -Wno-write-strings -Wno-unused-variable" << std::endl
<< std::endl
<< "ifeq ($(IS_CC_CLANG), 0)" << std::endl
<< " TRICK_IO_CXXFLAGS += -Wno-unused-local-typedefs -Wno-unused-but-set-variable" << std::endl
<< " ifeq ($(shell test $(GCC_MAJOR) -lt 6; echo $$?), 0)" << std::endl
<< " TRICK_IO_CXXFLAGS += -std=c++11" << std::endl
<< " endif" << std::endl
<< "endif" << std::endl
<< "ifeq ($(IS_CC_CLANG), 1)" << std::endl
<< " TRICK_IO_CXXFLAGS += -std=c++14" << std::endl
<< "endif" << std::endl
<< std::endl
<< "IO_OBJECTS =" ;