From 40e3781e9ba326a89625dd12b46c55c9916dd6ed Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Wed, 1 Mar 2017 08:56:17 +0100 Subject: [PATCH] CMake: Disable -Werror for Unity --- tests/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3e3e8c7..4767e50 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,13 @@ add_library(unity unity/src/unity.c) if(ENABLE_CJSON_TEST) + + # Disable -Werror for Unity + list(FIND custom_compiler_flags "-Werror" werror_found) + if (werror_found) + target_compile_options(unity PRIVATE "-Wno-error") + endif() + #copy test files file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/inputs") file(GLOB test_files "inputs/*")