From d1f70bfe2c3791933d1f1024e56f6404a7db918f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 20 Nov 2024 07:53:12 +0300 Subject: [PATCH] scripts: waifulib: cmake: filter out -MMD compiler flag from generated CMake flags --- scripts/waifulib/cmake.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/waifulib/cmake.py b/scripts/waifulib/cmake.py index 2a47fc8c..5d05560b 100644 --- a/scripts/waifulib/cmake.py +++ b/scripts/waifulib/cmake.py @@ -307,10 +307,13 @@ class CMake(object): flags = env.CFLAGS if len(flags): + # remove -MMD flag from gccdeps.py as it's already inserted by CMake + flags = [f for f in flags if not f == '-MMD'] content += 'set(CMAKE_C_FLAGS "%s")\n' % (' '.join(flags)) flags = env.CXXFLAGS if len(flags): + flags = [f for f in flags if not f == '-MMD'] content += 'set(CMAKE_CXX_FLAGS "%s")\n' % (' '.join(flags)) if len(self.tgens):