dmake: keep some dummy debug code in release Makefiles to make the debug/release more similar

This commit is contained in:
Daniel Marjamäki 2012-02-12 03:30:58 +01:00
parent 3c30dad5f1
commit f183954150
2 changed files with 35 additions and 31 deletions

View File

@ -5,6 +5,8 @@ ifndef HAVE_RULES
HAVE_RULES=no
endif
# Set the CPPCHK_GLIBCXX_DEBUG flag. This flag is not used in release Makefiles.
# The _GLIBCXX_DEBUG define doesn't work in cygin or other Win32 systems.
ifndef COMSPEC
ifdef ComSpec
#### ComSpec is defined on some WIN32's.

View File

@ -205,12 +205,10 @@ int main(int argc, char **argv)
fout << "# To compile with rules, use 'make HAVE_RULES=yes'\n";
makeConditionalVariable(fout, "HAVE_RULES", "no");
// Makefile settings..
if (release) {
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -DNDEBUG -Wall");
} else {
// The _GLIBCXX_DEBUG doesn't work in cygwin or other Win32 systems.
fout << "ifndef COMSPEC\n"
fout << "# Set the CPPCHK_GLIBCXX_DEBUG flag. This flag is not used in release Makefiles.\n"
<< "# The _GLIBCXX_DEBUG define doesn't work in cygin or other Win32 systems.\n"
<< "ifndef COMSPEC\n"
<< " ifdef ComSpec\n"
<< " #### ComSpec is defined on some WIN32's.\n"
<< " COMSPEC=$(ComSpec)\n"
@ -240,6 +238,10 @@ int main(int argc, char **argv)
<< "endif # COMSPEC\n"
<< "\n";
// Makefile settings..
if (release) {
makeConditionalVariable(fout, "CXXFLAGS", "-O2 -DNDEBUG -Wall");
} else {
// TODO: add more compiler warnings.
// -Wlogical-op : doesn't work on older GCC
// -Wconversion : too many warnings