Intel-C: declare support for gnu11

Without extensions, functions like `strdup` are not available since they
are actually controlled by feature flags such as _SVID_SOURCE and
_BSD_SOURCE. When using `-std=c11` on Intel, none of these flags are
set, so the functions are not declared properly leading to compile
errors.

Reported-by: Adam J. Stewart <ajstewart426@gmail.com>
Closes: #16226
This commit is contained in:
Ben Boeckel 2016-08-02 11:31:50 -04:00
parent e31084e657
commit cc223e1eed
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0)
set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11") set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11")
endif() endif()
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)