From 1629c543dbb7dcde78c48daa17a62af0e70fb467 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Tue, 7 May 2019 16:06:51 -0400 Subject: [PATCH] libhsakmt: Disable -Werror by default This can cause build failures on unknown of future compiler versions. Only enable it if explicitly enabled by an environment variable. This allows us to continue building with -Werror in internal builds with known compiler versions. Change-Id: Ic1cd9d223218cc4e4cddba49df93bb357c1cbd40 Signed-off-by: Felix Kuehling [ROCm/ROCR-Runtime commit: 8f10c9375d1606b4eb136864094813f2f9fc8177] --- projects/rocr-runtime/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/CMakeLists.txt b/projects/rocr-runtime/CMakeLists.txt index b8b565beab..e020132ac1 100644 --- a/projects/rocr-runtime/CMakeLists.txt +++ b/projects/rocr-runtime/CMakeLists.txt @@ -67,7 +67,7 @@ set (HSAKMT_C_FLAGS -fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-securi if ( CMAKE_COMPILER_IS_GNUCC ) set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Wlogical-op) endif () -if ( "${CMAKE_C_COMPILER_VERSION}" STRGREATER "4.8.0") +if ( ${HSAKMT_WERROR} ) set ( HSAKMT_C_FLAGS "${HSAKMT_C_FLAGS}" -Werror ) endif () if ( "${CMAKE_BUILD_TYPE}" STREQUAL Release )