diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-07-18 22:14:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-07-18 22:14:20 (GMT) |
commit | dfc06f79489da8609ea32a2794d76782502cf2fd (patch) | |
tree | b07285065c820720b70e6a6135e41fd8d16021ce /config | |
parent | d95f36686b2a68bcd848d68bcb81be520d01f037 (diff) | |
parent | 3a8892a0d90edb6c21c91ede18bf6b3cb2895af0 (diff) | |
download | hdf5-dfc06f79489da8609ea32a2794d76782502cf2fd.zip hdf5-dfc06f79489da8609ea32a2794d76782502cf2fd.tar.gz hdf5-dfc06f79489da8609ea32a2794d76782502cf2fd.tar.bz2 |
Merge pull request #1142 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '3a8892a0d90edb6c21c91ede18bf6b3cb2895af0':
Adjust error handling
TRILABS-137 Convert tcheck_version script to cmake tests
ifdef around std flag for cygwin
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 9 |
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 () |