summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-06-06 22:42:54 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-06-06 22:42:54 (GMT)
commit287b1fe70f219ab383d61672afc654eba6a792ce (patch)
tree0a6498e6fd400ec56578f48c3d033e99c25da404 /CMakeLists.txt
parent442946d6c98797d0c426976ff747219266cf9e14 (diff)
downloadhdf5-287b1fe70f219ab383d61672afc654eba6a792ce.zip
hdf5-287b1fe70f219ab383d61672afc654eba6a792ce.tar.gz
hdf5-287b1fe70f219ab383d61672afc654eba6a792ce.tar.bz2
[svn-r27156] Bring revisions #27003 - #27058 from trunk to revise_chunks. h5committested.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cacc5d..a3d537c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -472,7 +472,7 @@ endif (HDF5_DISABLE_COMPILER_WARNINGS)
# CDash is configured to only allow 3000 warnings, so
# break into groups (from the config/gnu-flags file)
#-----------------------------------------------------------------------------
-if (NOT MSVC)
+if (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
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")
@@ -535,7 +535,7 @@ if (NOT MSVC)
# Append more extra warning flags that only gcc 4.7+ know about
set (H5_CFLAGS5 "${H5_CFLAGS5} -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn")
-endif (NOT MSVC)
+endif (NOT MSVC AND CMAKE_COMPILER_IS_GNUCC)
#-----------------------------------------------------------------------------
# Option to allow the user to enable all warnings
@@ -548,7 +548,9 @@ if (HDF5_ENABLE_ALL_WARNINGS)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall")
else (MSVC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
+ if (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic ${H5_CFLAGS1} ${H5_CFLAGS2} ${H5_CFLAGS3} ${H5_CFLAGS4}")
+ endif (CMAKE_COMPILER_IS_GNUCC)
endif (MSVC)
endif (HDF5_ENABLE_ALL_WARNINGS)
@@ -563,7 +565,9 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
else (MSVC)
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
+ if (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
+ endif (CMAKE_COMPILER_IS_GNUCC)
endif (MSVC)
endif (HDF5_ENABLE_GROUPZERO_WARNINGS)