[CMake] Questions about cmake opencv and intel c++ compiler

Engin FIRAT enginfirat at gmail.com
Sat Aug 3 15:26:46 EDT 2013

Hello all,

I have some questions about opencv cmake configuration. I am using Intel's
icc compiler and using cmake to configure opencv to build with intel's icc

1. I feed CMAKE_CXX_COMPILER with some arguments. But in verbose mode I
have seen -fsigned-char flag  which is not provided by me is adding to

2. When searching about something about cmake and intel icc compiler, I
have seen in this mailing list someone talking about
INTERPROCEDURAL_OPTIMIZATION flag. But in my case I cannot see this option
to be filled. Is there a problem in my case? Moreover, I know that, there
should be an option for AVX and AVX2, but I haven't also seen any of these

3. When compiling, I have seen some pragma errors:
warning #161: unrecognized #pragma
  #  pragma GCC diagnostic ignored "-Wmissing-declarations" in file
This file's content is as following:
#ifdef __GNUC__
#  pragma GCC diagnostic ignored "-Wmissing-declarations"
#  if defined __clang__ || defined __APPLE__
#    pragma GCC diagnostic ignored "-Wmissing-prototypes"
#    pragma GCC diagnostic ignored "-Wextra"
#  endif
I understand from the content of this file, __GNUC__ is defined. But I
think that, __GNUC__ should not be defined. What do you think about this

4. To compile opencv with intel icc, I have been using the following
- source /opt/intel/bin/iccvars.sh -ia32
- export CC=icc
- export CXX=icpc
- cmake-gui
- make (in build directory)
Is this sequence true?

5. How do I use some additional flags for some different source code files
for OpenCV?

Best wishes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130803/c12741e2/attachment.htm>

More information about the CMake mailing list