diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-01-07 17:07:52 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-01-07 17:07:52 (GMT) |
commit | f7d530dd275e176e59b26c1b7363ba16b3ab6c9c (patch) | |
tree | adbee762e257098108c6e19ba28112e539f6a438 /config/cmake | |
parent | 906479d3978adabbacb59da8ec7ffb85d0ddfc2f (diff) | |
download | hdf5-f7d530dd275e176e59b26c1b7363ba16b3ab6c9c.zip hdf5-f7d530dd275e176e59b26c1b7363ba16b3ab6c9c.tar.gz hdf5-f7d530dd275e176e59b26c1b7363ba16b3ab6c9c.tar.bz2 |
HDFFV-10674, 10664, 10674
Diffstat (limited to 'config/cmake')
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 6 | ||||
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 157befd..14774c7 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -40,7 +40,7 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90 - LINK_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}" + LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}" ) if (${COMPILE_RESULT_VAR}) @@ -367,9 +367,9 @@ ENABLE_LANGUAGE (C) #----------------------------------------------------------------------------- macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) message (STATUS "Detecting C ${FUNCTION_NAME}") - if (CMAKE_REQUIRED_LIBRARIES) + if (HDF5_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") else () set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) endif () 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") |