Disable -Werror for one of CMakeLists.txt
<p>I have the following CMake file:</p>

<pre><code>project(MyLib)
cmake_minimum_required(VERSION 2.8)

if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "release")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
set(ROOT_DIR ${CMAKE_SOURCE_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${ROOT_DIR}/bin/${CMAKE_BUILD_TYPE})
set(MAIN_LIBRARY_NAME "mylib")

add_subdirectory(src)
add_subdirectory(test_app)
add_subdirectory(test_app1) &lt;--- I want to disable -Werror flag for CMakeLists.txt in this folder.
add_subdirectory(test_app2)
</code></pre>

<p>How to disable -Werror flag for one of subdirectories? In the each of sub directories I have CMakeLists.txt too. </p>