diff options
author | Brad King <brad.king@kitware.com> | 2023-08-18 20:10:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-08-18 20:13:21 (GMT) |
commit | eee1dc10bea6d2528a08c4e844d96b1f45cfe2ff (patch) | |
tree | 2c24cb9c3d06560176cccd694ce39e212d235d07 /Utilities/cmlibuv | |
parent | d6b4f6dd97e679a34aedda57cb3768842c74bcef (diff) | |
download | CMake-eee1dc10bea6d2528a08c4e844d96b1f45cfe2ff.zip CMake-eee1dc10bea6d2528a08c4e844d96b1f45cfe2ff.tar.gz CMake-eee1dc10bea6d2528a08c4e844d96b1f45cfe2ff.tar.bz2 |
libuv: Compile as C11 on all Solaris versions
Using `_XOPEN_SOURCE=600` on Solaris 5.10, as we do on Solaris 5.11+
already, allows the system headers to be included in C99 and C11 modes.
Diffstat (limited to 'Utilities/cmlibuv')
-rw-r--r-- | Utilities/cmlibuv/CMakeLists.txt | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 271e3cb..a0b161b 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -294,19 +294,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") ) list(APPEND uv_defines __EXTENSIONS__ + _XOPEN_SOURCE=600 ) + if(NOT CMAKE_C_STANDARD OR CMAKE_C_STANDARD EQUAL 90) + set(CMAKE_C_STANDARD 11) + endif() if(CMAKE_SYSTEM_VERSION STREQUAL "5.10") - set(CMAKE_C_STANDARD 90) - list(APPEND uv_defines - _XOPEN_SOURCE=500 - ) - else() - if(NOT CMAKE_C_STANDARD OR CMAKE_C_STANDARD EQUAL 90) - set(CMAKE_C_STANDARD 11) - endif() - list(APPEND uv_defines - _XOPEN_SOURCE=600 - ) + list(APPEND uv_defines SUNOS_NO_IFADDRS) endif() list(APPEND uv_sources src/unix/no-proctitle.c |