diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-05-15 14:38:38 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-05-15 14:38:38 (GMT) |
commit | 8060c37ef471233e09cfe7d54de04d560b9de744 (patch) | |
tree | e81b4a520af02b17dc709856bb30b095bfb7e410 /config | |
parent | 8be8a708a3ab5b84ef39ce1dca726ca1aa611af6 (diff) | |
download | hdf5-8060c37ef471233e09cfe7d54de04d560b9de744.zip hdf5-8060c37ef471233e09cfe7d54de04d560b9de744.tar.gz hdf5-8060c37ef471233e09cfe7d54de04d560b9de744.tar.bz2 |
[svn-r27087] Add changes for debug flags
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 6f37a48..56d17bf 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -3,7 +3,10 @@ #----------------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_BUILD_TYPE MATCHES Debug) - set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -ftrapv -fno-common") + 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} -ftrapv -fno-common") + endif () else (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99") if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) @@ -13,7 +16,10 @@ if (CMAKE_COMPILER_IS_GNUCC) endif (CMAKE_COMPILER_IS_GNUCC) if (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_BUILD_TYPE MATCHES Debug) - set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99 -ftrapv -fno-common") + set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99") + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrapv -fno-common") + endif () else (CMAKE_BUILD_TYPE MATCHES Debug) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -std=c99") if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) |