[svn-r24046] HDFFV-8500: set h5detect compile optimization to -O0

will generate correct H5Tinit.c file.

Tested: local gcc 4.8.2 linux
This commit is contained in:
Allen Byrne 2013-08-21 12:12:08 -05:00
parent 482a9c28e7
commit 6bc36a0c46

View File

@ -773,8 +773,13 @@ INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET (LOCAL_OPT_FLAG "-O0")
ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
SET (LOCAL_OPT_FLAG " ")
ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
TARGET_C_PROPERTIES (H5detect " " " ")
TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ")
IF (MSVC)
TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
ENDIF (MSVC)