diff options
author | Vicent Marti <vicent@github.com> | 2014-05-01 01:23:10 -0700 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-05-01 01:23:10 -0700 |
commit | 9d878fc420037a78f6ab36b86a42641cbd9425e0 (patch) | |
tree | 7f3f5f6b059a553cbb2a9a3266d57e51ca51e81c /CMakeLists.txt | |
parent | c522bed0af3f249d8617d214d2b3297ca6cac777 (diff) | |
parent | 183aa4f8317f5a64f1bc931551a342e6a93ce1c3 (diff) | |
download | libgit2-9d878fc420037a78f6ab36b86a42641cbd9425e0.tar.gz |
Merge pull request #2304 from jacquesg/solaris
Solaris!
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b5bd669f0..884c9bcf1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -172,7 +172,7 @@ IF (ENABLE_TRACE STREQUAL "ON") ENDIF() # Include POSIX regex when it is required -IF(WIN32 OR AMIGA OR ANDROID) +IF(WIN32 OR AMIGA OR ANDROID OR CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") INCLUDE_DIRECTORIES(deps/regex) SET(SRC_REGEX deps/regex/regex.c) ENDIF() @@ -290,6 +290,10 @@ IF (MSVC) ELSE () SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall -Wextra ${CMAKE_C_FLAGS}") + IF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)") + SET(CMAKE_C_FLAGS "-std=c99 -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS ${CMAKE_C_FLAGS}") + ENDIF() + IF (WIN32 AND NOT CYGWIN) SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG") ENDIF () |