Commit 98b8fcff by Jacques Germishuys

Build regex.c for Solaris. Added required defines for Solaris

parent ec771058
...@@ -168,7 +168,7 @@ IF (ENABLE_TRACE STREQUAL "ON") ...@@ -168,7 +168,7 @@ IF (ENABLE_TRACE STREQUAL "ON")
ENDIF() ENDIF()
# Include POSIX regex when it is required # 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) INCLUDE_DIRECTORIES(deps/regex)
SET(SRC_REGEX deps/regex/regex.c) SET(SRC_REGEX deps/regex/regex.c)
ENDIF() ENDIF()
...@@ -290,6 +290,10 @@ IF (MSVC) ...@@ -290,6 +290,10 @@ IF (MSVC)
ELSE () ELSE ()
SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -Wall -Wextra ${CMAKE_C_FLAGS}") 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) IF (WIN32 AND NOT CYGWIN)
SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG") SET(CMAKE_C_FLAGS_DEBUG "-D_DEBUG")
ENDIF () ENDIF ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment