At the end of src/CMakeLists.txt, add the following line:
`add_cxx_compiler_flag(-foo)`
Then run:
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v
Before the patch:
CMake will output a `Performing Test FLAG_IS_SUPPORTED - Success` line
and the `-foo` option will be added on the command lines, leading to a
build failure.
After the patch:
CMake will output a `Performing Test foo_is_supported - Failed` line for
the `-foo` option and it will not be added on the command lines.