Add -Werror flag for lib and applications

This patch adds -Werror flag to lib and applications folders to treat
warnings as errors.

Change-Id: I2ab8c04ee809ae4b79c0ad29b808a9c37dd7b48d
Signed-off-by: Rajasekaran Kalidoss <rajasekaran.kalidoss@arm.com>
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index ed7aad1..79055b7 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,5 +1,5 @@
 #
-# SPDX-FileCopyrightText: Copyright 2021-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+# SPDX-FileCopyrightText: Copyright 2021-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
 # SPDX-License-Identifier: Apache-2.0
 #
 # Licensed under the Apache License, Version 2.0 (the License); you may
@@ -15,6 +15,11 @@
 # limitations under the License.
 #
 
+#
+# Compile options
+#
+add_compile_options(-Werror)
+
 # Build layer_by_layer_profiler
 add_subdirectory(layer_by_layer_profiler)