CMake: refactor `ZIG_PIE` and `ZIG_BUILD_ARGS`
commit34ed49c62d55e43afcc7be91391243d273985818
authorEric Joldasov <bratishkaerik@getgoogleoff.me>
Tue, 14 May 2024 17:49:12 +0000 (14 22:49 +0500)
committerEric Joldasov <bratishkaerik@landless-city.net>
Tue, 14 May 2024 18:40:42 +0000 (14 23:40 +0500)
treece30e3ec9031c5f4f0f3f4d3d4d29c0783d6f66a
parentb59c722a3fed1b873d4f82f38d248775bfe23ae4
CMake: refactor `ZIG_PIE` and `ZIG_BUILD_ARGS`

Set `ZIG_PIE` default to be same as `CMAKE_POSITION_INDEPENDENT_CODE`, and
add check for situation when `ZIG_PIE` is set to True but CMake does not
support compiling position independent code. CMake's support is needed
for "zigcpp" target.

Also remove temporary variables for constructing `ZIG_BUILD_ARGS`,
instead use `list(APPEND ...)` functions.

Also remove long unused `ZIG_NO_LANGREF` variable.

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
CMakeLists.txt