I must use Microsoft Visual C++ 2013 to build a project that uses OpenMP and links to the Intel MKL library, which also uses OpenMP. The issue is that Visual C++ 2013 uses OpenMP 2.0, while MKL is built with OpenMP 4.x.
Everything seems to work fine, even if this could be a false impression.
I get some of these warnings:
warning C4005: 'HUGE_VALF' : macro redefinition
I cannot just disable these warnings. How can I fix them?
As indicated in the answers, I have to exclude Microsoft's own OpenMP implementation and use Intel's one only. So I added this to my CMakeLists.txt file:
# Disable Microsoft's default OpenMP v.2 inclusion
set_target_properties(${PROJECT_LIB} PROPERTIES LINK_FLAGS /nodefaultlib:vcomp)
set_target_properties(${PROJECT_LIB} PROPERTIES LINK_FLAGS /nodefaultlib:vcompd)
set_target_properties(${PROJECT_LIB} PROPERTIES LINK_FLAGS libiomp5md.lib)
However I still get the same warnings...