# CMake: refactor \`ZIG_PIE\` and \`ZIG_BUILD_ARGS\` · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/34ed49c62d55e43afcc7be91391243d273985818)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 34ed49c62d55e43afcc7be91391243d273985818

Requested commit: 34ed49c62d55e43afcc7be91391243d273985818

Commit: 34ed49c62d55e43afcc7be91391243d273985818

Tree: ce30e3ec9031c5f4f0f3f4d3d4d29c0783d6f66a

Author: Eric Joldasov

Committer: Eric Joldasov

## Message

```
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>

```

## Parents

- [b59c722a3fed1b873d4f82f38d248775bfe23ae4](https://git.cafe/gitcafe/zig/commit/b59c722a3fed1b873d4f82f38d248775bfe23ae4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/34ed49c62d55e43afcc7be91391243d273985818?format=markdown)
