From dde91717e47f0460f507b8a2aa7c7b5ea436901f Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 13 Feb 2022 16:53:55 -0800 Subject: [PATCH] [build] cmake: Add ability to customize target warnings (#4032) --- cmake/modules/CompileWarnings.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/modules/CompileWarnings.cmake b/cmake/modules/CompileWarnings.cmake index f35f975cdf..b9d1ab8639 100644 --- a/cmake/modules/CompileWarnings.cmake +++ b/cmake/modules/CompileWarnings.cmake @@ -1,7 +1,7 @@ macro(wpilib_target_warnings target) if(NOT MSVC) - target_compile_options(${target} PRIVATE -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-error=deprecated-declarations) + target_compile_options(${target} PRIVATE -Wall -pedantic -Wextra -Werror -Wno-unused-parameter -Wno-error=deprecated-declarations ${WPILIB_TARGET_WARNINGS}) else() - target_compile_options(${target} PRIVATE /wd4146 /wd4244 /wd4251 /wd4267 /wd4996 /WX) + target_compile_options(${target} PRIVATE /wd4146 /wd4244 /wd4251 /wd4267 /wd4996 /WX ${WPILIB_TARGET_WARNINGS}) endif() endmacro()