diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-07 23:40:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-07 23:40:57 (GMT) |
commit | 44dccb5b15c146358f8544d492f678a469ef721d (patch) | |
tree | 3731a14d240364351813b0f27bd2c99610df9b40 /config | |
parent | 76bc845a2feda5169247c088f90bf6755494e61c (diff) | |
download | hdf5-44dccb5b15c146358f8544d492f678a469ef721d.zip hdf5-44dccb5b15c146358f8544d492f678a469ef721d.tar.gz hdf5-44dccb5b15c146358f8544d492f678a469ef721d.tar.bz2 |
Don't use -fstdarg-opt with clang-tidy (#3079)
* HDFCompilerFlags: mask -fstdarg-opt with clang-tidy
`clang-tidy` doesn't understand this `-f` flag and errors out.
* Add helpful comment
---------
Co-authored-by: Sean McBride <sean@rogue-research.com>
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDFCompilerFlags.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake index 1bbf57c..00850d3 100644 --- a/config/cmake/HDFCompilerFlags.cmake +++ b/config/cmake/HDFCompilerFlags.cmake @@ -54,7 +54,9 @@ if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common") endif () else () - if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND + NOT CMAKE_C_CLANG_TIDY) + # `clang-tidy` does not understand -fstdarg-opt 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) |