Add -Werror flag to compiler. 64/62964/2 submit/tizen_mobile/20160322.015128
authorDariusz Frankiewicz <d.frankiewic@samsung.com>
Mon, 21 Mar 2016 09:41:58 +0000 (10:41 +0100)
committerDariusz Frankiewicz <d.frankiewic@samsung.com>
Mon, 21 Mar 2016 14:47:48 +0000 (07:47 -0700)
[Issue#]   N/A
[Problem]  Compilation warnings being ignored by developers
[Cause]    Too much compiler output
[Solution] Adding a -Werror compilation flag so that warnings are
           treated as errors
[Verify]   Check that the project builds without warnings

Compilation warnings should not be ignored. They often warn about
things that may cause trouble if unattended. Too much warnings also pollutes the
compiler output making it illegible.
Adding this compilation flag will allow us to maintain the quality
of our code.

Change-Id: Ib7375b06168416c9c51c5e0b42430dd7599119a6

CMakeLists.txt

index f57c304..deb3457 100755 (executable)
@@ -107,7 +107,7 @@ MESSAGE("ARCH: ${ARCH}")
 MESSAGE("LIB_DL: ${LIB_DL}")
 
 SET(CMAKE_C_FLAGS "${INC_FLAGS}${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall")
-SET(CMAKE_CXX_FLAGS "${INC_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -Wall")
+SET(CMAKE_CXX_FLAGS "${INC_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -Wall -Werror")
 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall")
 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")