From e0e53a910141df7e362be9380a1a430c58d188b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 23:21:02 +0100 Subject: [PATCH 1/2] dmake: in run-dmake target run dmake with --release in a release Makefile (#5792) --- tools/dmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 1ca4262c0e5..eee4b458ba3 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -674,7 +674,7 @@ int main(int argc, char **argv) fout << "dmake:\ttools/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir)/path.o $(libcppdir)/utils.o externals/simplecpp/simplecpp.o\n"; fout << "\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)\n\n"; fout << "run-dmake: dmake\n"; - fout << "\t./dmake\n\n"; + fout << "\t./dmake" << (release ? " --release" : "") << "\n\n"; // Make CI in release builds happy fout << "clean:\n"; fout << "\trm -f build/*.cpp build/*.o lib/*.o cli/*.o test/*.o tools/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1\n\n"; fout << "man:\tman/cppcheck.1\n\n"; From d30233d7d2e2af667269886aa12a327681a4857a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 23:22:29 +0100 Subject: [PATCH 2/2] Makefile: run 'dmake --release' --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 92608b760a0..a73ade8692a 100644 --- a/Makefile +++ b/Makefile @@ -137,7 +137,7 @@ ifeq (clang++, $(findstring clang++,$(CXX))) CPPCHK_GLIBCXX_DEBUG= endif ifndef CXXFLAGS - CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -Woverloaded-virtual $(CPPCHK_GLIBCXX_DEBUG) -g + CXXFLAGS=-std=c++0x -O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-multichar endif ifeq (g++, $(findstring g++,$(CXX))) @@ -365,7 +365,7 @@ dmake: tools/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir)/path $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) run-dmake: dmake - ./dmake + ./dmake --release clean: rm -f build/*.cpp build/*.o lib/*.o cli/*.o test/*.o tools/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1