What is the best way to change just one line of `cmakeFlags` with overlay?

Really good to know applyPatches exist, it really blow my mind.
I also tested my proposed overlay method as xokdvium, both compile ok!
but the overlay method make my GPU not found, do not know why
Thank you so much for your help!