summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-02-08 23:26:28 (GMT)
committerGitHub <noreply@github.com>2021-02-08 23:26:28 (GMT)
commitcb7b7257e94c8283c94d8cc8f9f685fca43f2a08 (patch)
tree7c3af85fba2eccd15a8d8baa542a179d7830cec6 /config/cmake
parent3a04f2995bbbd664d7bd27ca21f48634abea6bc4 (diff)
downloadhdf5-cb7b7257e94c8283c94d8cc8f9f685fca43f2a08.zip
hdf5-cb7b7257e94c8283c94d8cc8f9f685fca43f2a08.tar.gz
hdf5-cb7b7257e94c8283c94d8cc8f9f685fca43f2a08.tar.bz2
1 10 merges from develop (#320)
* HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake8
-rw-r--r--config/cmake/HDFCompilerFlags.cmake14
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake8
3 files changed, 30 insertions, 0 deletions
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index 4f2eabe..ebda39f 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -30,6 +30,14 @@ if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
endif ()
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+ endif ()
endif ()
endif ()
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index fb527d5..3d3cc6a 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -31,6 +31,20 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to enable build extended diagnostics
+ #
+ # This should NOT be on by default as it can cause process issues.
+ #-----------------------------------------------------------------------------
+ option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+ endif ()
endif ()
endif ()
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index c7f085c..5521f6d 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -45,6 +45,14 @@ endif ()
#-----------------------------------------------------------------------------
# HDF5 library compile options
#-----------------------------------------------------------------------------
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so