How can I use "-Wunused" of GCC flags on driveworks samples?

I am trying to modify sample project and compile that.

But, I have be in trouble because of this error.

$ make -j && make install && ./install/bin/main
...
error: unused variable ‘tmp’ [-Werror=unused-variable]
         dwImageGL tmp;
                   ^
cc1plus: all warnings being treated as errors
make[2]: *** [src/main/CMakeFiles/main.dir/main.cpp.o] Error 1
make[1]: *** [src/main/CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

...

How can I use “-Wunused” of GCC flags on driveworks samples?

Below is the cmake command I typed.

$ cmake -DCMAKE_BUILD_TYPE=Debug -Wunused ..

I solved this issue.

I just removed “-Werror” option in 35 line of /project/path/cmake/SamplesConfiguration.cmake file.

# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wunused -Wunused-value -Wunused-parameter")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wunused -Wunused-value -Wunused-parameter")