diff options
| author | levlam <levlam@telegram.org> | 2021-09-01 19:32:21 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2021-09-01 19:32:21 +0300 |
| commit | 7968aad0d485c9053ee40b6becb02565acf716aa (patch) | |
| tree | b2d35725b3884d99d537c7978f2406e0acb1017f /CMake | |
| parent | bfd76964ea0f86f7492991a1bd3c795ff488c91f (diff) | |
Suppress GCC warnings about casts of function pointers returned by GetProcAddress.
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/TdSetUpCompiler.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMake/TdSetUpCompiler.cmake b/CMake/TdSetUpCompiler.cmake index d168a5960..62013f52a 100644 --- a/CMake/TdSetUpCompiler.cmake +++ b/CMake/TdSetUpCompiler.cmake @@ -134,6 +134,10 @@ function(td_set_up_compiler) if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)) add_cxx_compiler_flag("-Wno-maybe-uninitialized") # too much false positives endif() + if (WIN32 AND GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)) + # warns about casts of function pointers returned by GetProcAddress + add_cxx_compiler_flag("-Wno-cast-function-type") + endif() if (GCC AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)) # warns about a lot of "return std::move", which are not redundant for compilers without fix for DR 1579, i.e. GCC 4.9 or clang 3.8 # see http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579 |
