summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da003c5..bd84c71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -283,6 +283,9 @@ ELSE (BUILD_SHARED_LIBS)
IF (NOT WIN32)
# should this be a user setting : Everyone uses it anyway ?
ADD_DEFINITIONS (-DPIC)
+ IF (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ ADD_DEFINITIONS (-KPIC)
+ ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
ENDIF (NOT WIN32)
ENDIF (BUILD_SHARED_LIBS)
@@ -461,7 +464,11 @@ ENDIF (HDF5_DISABLE_COMPILER_WARNINGS)
# break into groups (from the config/gnu-flags file)
#-----------------------------------------------------------------------------
IF (NOT MSVC)
- SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline")
+ IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline")
+ ELSE (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -erroff=%none -DBSD_COMP")
+ ENDIF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# Append warning flags
# Don't use the '-Wtraditional' flag, we're way past having K&R C code
# SET (H5_CFLAGS "${H5_CFLAGS} -Wtraditional")