In `src/CMakeLists.txt` replace the line `add_linker_flag(-pie)` with
`add_linker_flag(-pie -foo)`.
Then:
mkdir buildcmake && cd buildcmake
cmake -GNinja ..
ninja -v
Cmake should output a `Performing Test foo_is_supported - Failed` line.
Check that the `-pie` flag is passed on the linker command line but not
the `-foo` flag.