Hi all,

I was trying to add a cxx flags to clang -Wno-#warnings. to supress a
deprecated header warning.

In file included from main.cxx:3:
/opt/install/vcl/vcl_deprecated_header.h:10:3: warning: "deprecated"
[-W#warnings]
# warning "deprecated"

when i compile from terminal.

clang++ main.cxx -I/opt/install/vcl/include/ -Wno-#warnings

gives me no warning and error.

but I cannot set this cxx flags on cmake neither by ccmake nor by cmake
-DCMAKE_CXX_FLAGS

The cmake error is throwing up on configure saying compiler of test program
failed.


  Building CXX object
  CMakeFiles/cmTryCompileExec1599991946.dir/TestGDALHasOGR.cxx.o

  /usr/bin/clang++ -Wno- -o
  CMakeFiles/cmTryCompileExec1599991946.dir/TestGDALHasOGR.cxx.o -c
  /home/otbtesting/OTB/trunk/OTB/CMake/TestGDALHasOGR.cxx

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

It is clear that -Wno-#warning is not parsed properly. This maybe due to
clang warning flag starting with # symbol.

Is there any way to add this flag to cmake.

I am using Fedora 20 x86_64
cmake --version
cmake version 2.8.12.2

-- 
Regards,
   Rashad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to