dmake: use -std=c++11 even if CXXFLAGS is redefined
This commit is contained in:
parent
86763b401c
commit
50c8075b15
|
@ -82,7 +82,7 @@ static void compilefiles(std::ostream &fout, const std::vector<std::string> &fil
|
||||||
getDeps(files[i], depfiles);
|
getDeps(files[i], depfiles);
|
||||||
for (unsigned int dep = 0; dep < depfiles.size(); ++dep)
|
for (unsigned int dep = 0; dep < depfiles.size(); ++dep)
|
||||||
fout << " " << depfiles[dep];
|
fout << " " << depfiles[dep];
|
||||||
fout << "\n\t$(CXX) " << args << " $(CPPFLAGS) $(CFG) $(CXXFLAGS) -c -o " << objfile(files[i]) << " " << builddir(files[i]) << "\n\n";
|
fout << "\n\t$(CXX) " << args << " $(CPPFLAGS) $(CFG) $(CXXFLAGS) -std=c++11 -c -o " << objfile(files[i]) << " " << builddir(files[i]) << "\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
// Makefile settings..
|
// Makefile settings..
|
||||||
if (release) {
|
if (release) {
|
||||||
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -DNDEBUG -Wall -std=c++11");
|
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -DNDEBUG -Wall");
|
||||||
} else {
|
} else {
|
||||||
// TODO: add more compiler warnings.
|
// TODO: add more compiler warnings.
|
||||||
// -Wlogical-op : doesn't work on older GCC
|
// -Wlogical-op : doesn't work on older GCC
|
||||||
|
@ -316,7 +316,6 @@ int main(int argc, char **argv)
|
||||||
// "-Wsign-conversion "
|
// "-Wsign-conversion "
|
||||||
"-Wsign-promo "
|
"-Wsign-promo "
|
||||||
// "-Wunreachable-code "
|
// "-Wunreachable-code "
|
||||||
"-std=c++11 "
|
|
||||||
"$(CPPCHK_GLIBCXX_DEBUG) "
|
"$(CPPCHK_GLIBCXX_DEBUG) "
|
||||||
"-g");
|
"-g");
|
||||||
}
|
}
|
||||||
|
@ -360,18 +359,18 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
fout << "\n###### Targets\n\n";
|
fout << "\n###### Targets\n\n";
|
||||||
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
|
fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n";
|
||||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++11 -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS)\n\n";
|
||||||
fout << "all:\tcppcheck testrunner\n\n";
|
fout << "all:\tcppcheck testrunner\n\n";
|
||||||
fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o\n";
|
fout << "testrunner: $(TESTOBJ) $(LIBOBJ) $(EXTOBJ) cli/threadexecutor.o cli/cmdlineparser.o cli/cppcheckexecutor.o cli/filelister.o cli/pathmatch.o\n";
|
||||||
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS) $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++11 -o testrunner $(TESTOBJ) $(LIBOBJ) cli/threadexecutor.o cli/cppcheckexecutor.o cli/cmdlineparser.o cli/filelister.o cli/pathmatch.o $(EXTOBJ) $(LIBS) $(LDFLAGS)\n\n";
|
||||||
fout << "test:\tall\n";
|
fout << "test:\tall\n";
|
||||||
fout << "\t./testrunner\n\n";
|
fout << "\t./testrunner\n\n";
|
||||||
fout << "check:\tall\n";
|
fout << "check:\tall\n";
|
||||||
fout << "\t./testrunner -g -q\n\n";
|
fout << "\t./testrunner -g -q\n\n";
|
||||||
fout << "dmake:\ttools/dmake.cpp\n";
|
fout << "dmake:\ttools/dmake.cpp\n";
|
||||||
fout << "\t$(CXX) -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) -std=c++11 -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib $(LDFLAGS)\n\n";
|
||||||
fout << "reduce:\ttools/reduce.cpp\n";
|
fout << "reduce:\ttools/reduce.cpp\n";
|
||||||
fout << "\t$(CXX) -g -o reduce tools/reduce.cpp -Ilib -Iexternals/tinyxml lib/*.cpp externals/tinyxml/tinyxml2.cpp\n\n";
|
fout << "\t$(CXX) -std=c++11 -g -o reduce tools/reduce.cpp -Ilib -Iexternals/tinyxml lib/*.cpp externals/tinyxml/tinyxml2.cpp\n\n";
|
||||||
fout << "clean:\n";
|
fout << "clean:\n";
|
||||||
fout << "\trm -f build/*.o lib/*.o cli/*.o test/*.o externals/tinyxml/*.o testrunner reduce cppcheck cppcheck.1\n\n";
|
fout << "\trm -f build/*.o lib/*.o cli/*.o test/*.o externals/tinyxml/*.o testrunner reduce cppcheck cppcheck.1\n\n";
|
||||||
fout << "man:\tman/cppcheck.1\n\n";
|
fout << "man:\tman/cppcheck.1\n\n";
|
||||||
|
|
Loading…
Reference in New Issue