commit 173f87e00a0695e1361803e044399832960c6d55 parent a911c85267d8ce0fc59cf7a2b429ba444fe7caa4 Author: cfillion <cfillion@users.noreply.github.com> Date: Wed, 21 Oct 2020 17:02:55 -0400 fix building with Clang 11 Diffstat:
M | src/CMakeLists.txt | | | 8 | ++++++++ |
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -1,3 +1,5 @@ +include(CheckCXXCompilerFlag) + find_package(Boost 1.56 REQUIRED) find_package(CURL REQUIRED) find_package(MiniZip REQUIRED) @@ -124,6 +126,12 @@ else() -Wno-unused-function -Wno-missing-braces ) + # Clang 11 + check_cxx_compiler_flag(-Wnon-c-typedef-for-linkage HAVE_NON_C_TYPEDEF_FOR_LINKAGE) + if(HAVE_NON_C_TYPEDEF_FOR_LINKAGE) + target_compile_options(reapack PUBLIC -Wno-non-c-typedef-for-linkage) + endif() + if(APPLE) # macOS 10.7–10.8 defaults to libstdc++ target_compile_options(reapack PUBLIC -stdlib=libc++)