cmake: correct PIE support detection, add error output for debugging

`check_pie_supported` only uses the `OUTPUT_VARIABLE` to to signify errors
if PIE is actually supported is signaled by `CMAKE_<lang>_LINK_PIE_SUPPORTED`.

Checking if `OUTPUT_VARIABLE` is empty is not enough either since the check
is bypassed if its results are cached but the output variable is not cached.
41dbd0d0daJan200101 committed on 10/11/2024, 3:07:54 PM· committed by Alex Rønne Petersenparent901f344
1 file changedLine totals unavailable