ARDUINO_GENERIC_G070CBTX where I should define the macro?

I use my cutom board, and I create the variant folder, and the boad.json like the picture
then I complie my project, there are some errors, at last, I find that in variant_STM32G070CB.cpp and generic_clock.c I shoud use the macro #define ARDUINO_GENERIC_G070CBTX, but in the other offical boards it was defined automatic, I do not konw where I was wrong, although I can slove the problem temporarily by adding macro?

The board macro is autogenerated from the file name of the board json file and MCU name data.

If you want the macro to be defined, just add build_flags = -DARDUINO_GENERIC_G070CBTX to your platformio.ini.