(Build) Ensure Env options are expanded correctly 03/203503/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 15 Apr 2019 09:15:06 +0000 (10:15 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 15 Apr 2019 09:15:11 +0000 (10:15 +0100)
If CXXFLAGS was not set then it expanded to nothing causing an error.
The solution was to surround it by quotes so that it is evaluated
correctly within the if statement.

Change-Id: I410a0fe13882f13b4ad84e4f68db4a46dcb93037

build/tizen-cmake/CMakeLists.txt

index c25032dae5b4741714449d330c712234b73b3d75..988cf6114d1054062435b5c96689e98f5a0f059b 100644 (file)
@@ -86,7 +86,7 @@ ADD_COMPILE_OPTIONS( -std=c++11 -gdwarf-4 )
 ADD_COMPILE_OPTIONS( -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast )
 ADD_COMPILE_OPTIONS( -Werror -Wall -Wextra -Wno-unused-parameter -Wfloat-equal )
 
-IF( ENABLE_COVERAGE OR $ENV{CXXFLAGS} MATCHES --coverage )
+IF( ENABLE_COVERAGE OR "$ENV{CXXFLAGS}" MATCHES --coverage )
   ADD_COMPILE_OPTIONS( --coverage )
   SET(ENABLE_COVERAGE ON)
   SET(COVERAGE --coverage)