# ISPC Language support

**URL:** https://discourse.cmake.org/t/ispc-language-support/673
**Category:** Development
**Created:** [February 21, 2020, 12:56am UTC](https://discourse.cmake.org/t/ispc-language-support/673 "2020-02-21T00:56:34Z")
**Posts on this page:** 1
**Showing post:** 20

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [March 24, 2020, 3:18pm UTC](https://discourse.cmake.org/t/ispc-language-support/673/20 "2020-03-24T15:18:29Z")

</div>

No. `CMAKE_<lang>_LINK_OPTIONS_NO_PIE` is not used by default. If `POSITION_INDEPENDENT_CODE` is not set (`TRUE` or `FALSE`), no flags are applied to link step.

`PIE` flag (`-fpie` or `-fno_pie`) is applied **only** if property `POSITION_INDEPENDENT_CODE` is set (‘TRUE’ or ‘FALSE’).

To ensure consistency for the link step, define the variable `CMAKE_POSITION_INDEPENDENT_CODE` and include module `CheckPIESupport` in the root `CMakelist.txt` and call `check_pie_supported()`.

variable `CMAKE_POSITION_INDEPENDENT_CODE` can take `TRUE` or `FALSE`:

- set to `FALSE`: `gcc` and `ispc` will compile in their default mode (`PIC` for gcc and `NO_PIC` for ispc) but the linker will specify `-fno_pie` so link will succeed.
- set to `TRUE`: `gcc` and `ispc` will compile with option `-fPIC` and the linker will use option `-fpie` and the link will succeed.

---

_[View the full topic](https://discourse.cmake.org/t/ispc-language-support/673)._
