cmake: use CMAKE_C_STANDARD and CMAKE_C_EXTENSIONS

cmake already provides a standard way for callers to override the
C_STANDARD and C_EXTENSIONS properties. Support and document those.
This commit is contained in:
Edward Thomson
2024-10-19 13:18:04 +01:00
parent 6ea625cdad
commit d090433ef1
12 changed files with 4 additions and 36 deletions

View File

@@ -378,8 +378,8 @@ linker. These flags may be useful for cross-compilation or specialized
setups.
- `CMAKE_C_FLAGS`: Set your own compiler flags
- `C_STANDARD`: the C standard to compile against; defaults to `C90`
- `C_EXTENSIONS`: whether compiler extensions are supported; defaults to `OFF`
- `CMAKE_C_STANDARD`: the C standard to compile against; defaults to `C90`
- `CMAKE_C_EXTENSIONS`: whether compiler extensions are supported; defaults to `OFF`
- `CMAKE_FIND_ROOT_PATH`: Override the search path for libraries
- `ZLIB_LIBRARY`, `OPENSSL_SSL_LIBRARY` AND `OPENSSL_CRYPTO_LIBRARY`:
Tell CMake where to find those specific libraries