summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-04 16:57:31 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-05 13:52:24 (GMT)
commitb08d2d993c8bcebf6b68222fb5b8e55fee047503 (patch)
tree0e5d83986bf971b94fc725f1ed1ff4727f329c89 /Utilities/cmlibuv
parent5a9f1b87c30870a6a705f882039b2b4e98126813 (diff)
downloadCMake-b08d2d993c8bcebf6b68222fb5b8e55fee047503.zip
CMake-b08d2d993c8bcebf6b68222fb5b8e55fee047503.tar.gz
CMake-b08d2d993c8bcebf6b68222fb5b8e55fee047503.tar.bz2
libuv: Compile as C 90 on Solaris 5.10 with SunPro 5.14
Diffstat (limited to 'Utilities/cmlibuv')
-rw-r--r--Utilities/cmlibuv/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt
index 6632a1e..143209f 100644
--- a/Utilities/cmlibuv/CMakeLists.txt
+++ b/Utilities/cmlibuv/CMakeLists.txt
@@ -221,12 +221,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
__EXTENSIONS__
)
if(CMAKE_SYSTEM_VERSION STREQUAL "5.10")
+ set(CMAKE_C_STANDARD 90)
+ if(CMAKE_VERSION VERSION_LESS 3.8.20170504 AND CMAKE_C_COMPILER_ID STREQUAL "SunPro" AND NOT 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} -std=c90")
+ endif()
list(APPEND uv_defines
_XOPEN_SOURCE=500
)
- if(CMAKE_C_STANDARD)
- set(CMAKE_C_STANDARD 90)
- endif()
else()
list(APPEND uv_defines
_XOPEN_SOURCE=600