commit 8076537a52bb026941f13f5542395aac69ef0825 Author: Austin Seipp Date: Sat May 4 17:34:51 2019 -0500 cmake: add workarounds for NixOS-specific deficiencies [NixOS] The NixOS debug builder hook adds '-Wa,--compress-debug-sections' to the link flags (it actually adds it to the compiler flags, but the compiler is used for linking, so...). This makes the compiler angry when -Werror is passed, because it's unused at link-time (-Wa applies to the assembler). Suppress this warning with -Wno-unused-command-line-argument NB: we *could* use -Wno-error=unused-command-line-argument, but that still results in warnings anyway, just not fatal ones. We'd like to remove them all for the sake of the build output. Signed-off-by: Austin Seipp diff --git a/cmake/ConfigureCompiler.cmake b/cmake/ConfigureCompiler.cmake index 03af9c10..7d059375 100644 --- a/cmake/ConfigureCompiler.cmake +++ b/cmake/ConfigureCompiler.cmake @@ -119,6 +119,11 @@ else() else() add_compile_options(-Werror) endif() + if (CLANG) + # aseipp: NixOS hack + add_compile_options(-Wno-unused-command-line-argument) + add_link_options(-Wno-unused-command-line-argument) + endif() add_compile_options($<$:-Wno-pragmas>) add_compile_options(-Wno-error=format -Wunused-variable