summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-01-02 23:07:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-01-02 23:07:37 (GMT)
commit6f6d0921c0592c202bae15dab1b05c921aef0043 (patch)
tree6e5318271fb27396eb0354d0645a4f4ae7255317 /config
parenteaaddcc9e5d9b717f4ae0ac4ee8dc6aa28fab133 (diff)
downloadhdf5-6f6d0921c0592c202bae15dab1b05c921aef0043.zip
hdf5-6f6d0921c0592c202bae15dab1b05c921aef0043.tar.gz
hdf5-6f6d0921c0592c202bae15dab1b05c921aef0043.tar.bz2
Use c99 standard cmake variable
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDFCompilerFlags.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 93ebc3c..0a39568 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -9,16 +9,16 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED TRUE)
message (STATUS "Warnings Configuration:")
+set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
#-----------------------------------------------------------------------------
# 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")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")