<div dir="ltr">Hi all,<div><br></div><div>I was trying to add a cxx flags to clang -Wno-#warnings. to supress a deprecated header warning.</div><div><br></div><div><div>In file included from main.cxx:3:</div><div>/opt/install/vcl/vcl_deprecated_header.h:10:3: warning: "deprecated" [-W#warnings]</div>

<div># warning "deprecated"</div><div><br></div><div>when i compile from terminal.</div><div><br></div><div><div>clang++ main.cxx -I/opt/install/vcl/include/ -Wno-#warnings</div></div><div><br></div><div>gives me no warning and error.</div>

<div><br></div><div>but I cannot set this cxx flags on cmake neither by ccmake nor by cmake -DCMAKE_CXX_FLAGS</div><div><br></div><div>The cmake error is throwing up on configure saying compiler of test program failed.</div>

<div><br></div><div><br></div><div><div>  Building CXX object</div><div>  CMakeFiles/cmTryCompileExec1599991946.dir/TestGDALHasOGR.cxx.o</div><div><br></div><div>  /usr/bin/clang++ -Wno- -o</div><div>  CMakeFiles/cmTryCompileExec1599991946.dir/TestGDALHasOGR.cxx.o -c</div>

<div>  /home/otbtesting/OTB/trunk/OTB/CMake/TestGDALHasOGR.cxx</div><div><br></div><div>  /home/otbtesting/OTB/trunk/OTB/CMake/TestGDALHasOGR.cxx:4:10: fatal error:</div><div>  'ogrsf_frmts.h' file not found</div>

<div><br></div></div><div>It is clear that -Wno-#warning is not parsed properly. This maybe due to clang warning flag starting with # symbol.</div><div><br></div><div>Is there any way to add this flag to cmake.</div><div>

<br></div><div>I am using Fedora 20 x86_64</div><div><div>cmake --version</div><div>cmake version 2.8.12.2</div></div><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div>


</div></div>