summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDFCompilerFlags.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-07-27 14:58:11 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-07-27 14:58:11 (GMT)
commitbb436dbc61698aff318a317056c1f42052b434e0 (patch)
tree458e02f500565a51647be13cdbd29db30f87c89b /config/cmake/HDFCompilerFlags.cmake
parent2c5c115a6182b3aa11e8a960cf4a961b6c1943c1 (diff)
downloadhdf5-bb436dbc61698aff318a317056c1f42052b434e0.zip
hdf5-bb436dbc61698aff318a317056c1f42052b434e0.tar.gz
hdf5-bb436dbc61698aff318a317056c1f42052b434e0.tar.bz2
Update macros and cygwin flags
Diffstat (limited to 'config/cmake/HDFCompilerFlags.cmake')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 1ba090c..214afa0 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -13,26 +13,27 @@
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
if (CMAKE_COMPILER_IS_GNUCC)
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
+ if (NOT CYGWIN)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+ endif ()
if (${HDF_CFG_NAME} MATCHES "Debug")
- set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")
endif ()
else ()
- set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
endif ()
endif ()
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
+ set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (${HDF_CFG_NAME} MATCHES "Debug")
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
endif ()
else ()
- set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
endif ()