1 | initial version |
According to script (https://github.com/opencv/opencv/blob/3.2.0/cmake/OpenCVFindLibsPerf.cmake#L139-L146) this flag is set by cmake's own script (for example /usr/share/cmake-3.5/Modules/FindOpenMP.cmake
), which in turns tries to compile a piece of code with several flag candidates and chooses first succeeded. It moves most appropriate flag to the beginning of the list to speed up the detection. For Intel compiler, the first priority flag is:
if(WIN32)
set(OMP_FLAG_Intel "-Qopenmp")
elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel" AND
"${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
set(OMP_FLAG_Intel "-openmp")
else()
set(OMP_FLAG_Intel "-qopenmp")
endif()
So, you can provide your own FindOpenMP.cmake
script (try to put it to the opencv/cmake
folder or to the one of other paths described here) which will set appropriate flags. But I'd recommend you leaving it as is or using TBB.
BTW, RelWithDebInfo
is prohibited by OpenCV's cmake scripts, only Debug
and Release
are available.