diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-07-18 14:39:13 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-07-18 14:39:13 (GMT) |
commit | 72931507f94fc28ec68d8b96ad928848dae83456 (patch) | |
tree | 1915e54469d19cc346a77256d42232b81010b768 | |
parent | d95f36686b2a68bcd848d68bcb81be520d01f037 (diff) | |
download | hdf5-72931507f94fc28ec68d8b96ad928848dae83456.zip hdf5-72931507f94fc28ec68d8b96ad928848dae83456.tar.gz hdf5-72931507f94fc28ec68d8b96ad928848dae83456.tar.bz2 |
ifdef around std flag for cygwin
-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 () |