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
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)