From 273a93cfcfafef6fd02d25fa859a66f9478dc47e Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 22 Aug 2022 10:28:10 +0200
Subject: [PATCH] build/python/cmake: set CMAKE_C_FLAGS_INIT, not CMAKE_C_FLAGS

According to
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS_INIT.html
the _INIT variables should be set in the toolchain file.
---
 python/build/cmake.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python/build/cmake.py b/python/build/cmake.py
index 4f1af6a1f..b41d14698 100644
--- a/python/build/cmake.py
+++ b/python/build/cmake.py
@@ -26,8 +26,8 @@ set(CMAKE_SYSTEM_PROCESSOR {toolchain.actual_arch.split('-', 1)[0]})
 set(CMAKE_C_COMPILER_TARGET {toolchain.actual_arch})
 set(CMAKE_CXX_COMPILER_TARGET {toolchain.actual_arch})
 
-set(CMAKE_C_FLAGS "{toolchain.cflags} {toolchain.cppflags}")
-set(CMAKE_CXX_FLAGS "{toolchain.cxxflags} {toolchain.cppflags}")
+set(CMAKE_C_FLAGS_INIT "{toolchain.cflags} {toolchain.cppflags}")
+set(CMAKE_CXX_FLAGS_INIT "{toolchain.cxxflags} {toolchain.cppflags}")
 """)
     __write_cmake_compiler(f, 'C', toolchain.cc)
     __write_cmake_compiler(f, 'CXX', toolchain.cxx)