Use -Wall compiler warning level
Sets the C and C++ compiler warning level to -Wall. Fixes for
warnings judged to be non-functional are included in this commit.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I783ff274b7fbd802bc25074953e2c2f287114605
diff --git a/environments/linux-pc/default_toolchain_file.cmake b/environments/linux-pc/default_toolchain_file.cmake
index 6978dbf..1fa32cc 100644
--- a/environments/linux-pc/default_toolchain_file.cmake
+++ b/environments/linux-pc/default_toolchain_file.cmake
@@ -1,8 +1,15 @@
#-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
include($ENV{TS_ROOT}/tools/cmake/compiler/config_iface.cmake REQUIRED)
+
+# Set compiler warning level for the root build context. External components
+# are responsible for setting their own warning level.
+if(DEFINED TS_ROOT)
+ string(APPEND CMAKE_C_FLAGS_INIT " -Wall")
+ string(APPEND CMAKE_CXX_FLAGS_INIT " -Wall")
+endif()