diff options
author | Brad King <brad.king@kitware.com> | 2017-05-04 13:08:22 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-05 09:52:25 -0400 |
commit | 6b0bc4328100b5ec9e0d4a36487c82dc8cab91ae (patch) | |
tree | 617d06c4b3af73dbce158ffed8d86059c87def5e /Utilities | |
parent | b08d2d993c8bcebf6b68222fb5b8e55fee047503 (diff) | |
download | cmake-6b0bc4328100b5ec9e0d4a36487c82dc8cab91ae.tar.gz |
libuv: Compile as C 99 on Solaris 5.11
SunPro 5.13 and below do not compile as c99 by default.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibuv/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt index 143209f3c8..b6e794146a 100644 --- a/Utilities/cmlibuv/CMakeLists.txt +++ b/Utilities/cmlibuv/CMakeLists.txt @@ -230,6 +230,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") _XOPEN_SOURCE=500 ) else() + if(NOT CMAKE_C_STANDARD OR CMAKE_C_STANDARD EQUAL 90) + set(CMAKE_C_STANDARD 11) + endif() + if(CMAKE_VERSION VERSION_LESS 3.8.20170505 AND CMAKE_C_COMPILER_ID STREQUAL "SunPro" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 5.14) + # The running version of CMake does not know how to add this flag. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xc99") + endif() list(APPEND uv_defines _XOPEN_SOURCE=600 ) |