esp-idf uses imported targets as dummy targets that are never linked.
Previous CMake versions would ignore these and not error on unset
IMPORTED_LOCATION if they are never actually linked. CMake 4.2 and newer
errors during codemodel-v2 api queries when imported targets are missing
IMPORTED_LOCATION, so set a dummy location that would error when
actually linked, which fixes the error during api queries.
Closes https://github.com/espressif/esp-idf/pull/18103
The syntax for setting cache variables is actually
set(<variable> <value> CACHE <type> <docstring>) and not
set(<variable> CACHE <type> <value>).
The previous code silently set the variables to the empty string.