Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6764 Discussions

cmake config bugs for IPP 2021.4.0 -- unusable

diablodale
Novice
1,397 Views

Hello. While IPP binary is working well on Windows, the cmake configuration of IPP included in the C:\Program Files (x86)\Intel\oneAPI\ipp\2021.4.0\lib\cmake\ipp is non-functional due to multiple bugs.

Of most importance, it doesn't configure the cmake environment so that the penultimate variable `IPP_LIBRARIES` is configured and set. Making the cmake config here useless to setup the list of symbolic library names and paths.

Here is a list of some of the bugs in ipp-config.cmake. There are more.

functions are used when they should be macros. Why? Because a function sets up a new scope and setting IPP_LIBRARIES within that new scope does not cascade outwards. Therefore all of the work done in all of your functions is lost.

`foreach (_component IN LISTS list_of_components)` is incorrect and will always fail. The correct usage is `foreach (_component ${list_of_components})`. You make this mistake in other lines in this file. Probably other files too.

After fixing all the bugs like above, you will then fail on `target_link_libraries(IPP::ippvm INTERFACE IPP::ippcore)` because you are assuming IPP::ippvm was a component defined. But it isn't always defined. Because of your config supports statements like `find_package(IPP 10.3 CONFIG REQUIRED COMPONENTS ippcore ipp_iw)` which don't configure ippvm.

 

I stopped there because there are just too many bugs in your cmake support.

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
1,361 Views

The issue is escalated and will be addressed in one of the next updates/releases.


0 Kudos
Daniel_D
Novice
1,290 Views

Hi,

 

I just tried 2022.1 (which lives in the 2021.5 folder). So far IO still see the same issues with cmake. I use this in my cMakeList.txt:

 

set( IPP_SHARED FALSE )
find_package(IPP REQUIRED)
message(STATUS "IPP_INCLUDE_DIR: ${IPP_INCLUDE_DIR}")

if (IPP_FOUND)
   message(STATUS "IPP - FOUND!!!!!")
   include_directories (SYSTEM "C:/Program Files (x86)/Intel/oneAPI/ipp/latest/include")
endif()

 

and this is the output:

 

1> [CMake] -- IPP_INCLUDE_DIR:
1> [CMake] -- IPP - FOUND!!!!!

IPP_INCLUDE_DIR is still not set.

 

Daniel

 

0 Kudos
Gennady_F_Intel
Moderator
1,288 Views

Yes, the fix will be part of one of the next updates. We will keep this thread inform when it will happen.


0 Kudos
Emmenlauer__Mario
New Contributor I
1,097 Views

I can confirm the issue on Linux, the cmake configuration does not work there either for the same issues reported above.

 

There is another slightly related issue: The cmake config is called "ipp-config" (lowercase, with dash) and not "IPPConfig" (uppercase, without dash). This is inconsistent with the oneDAL and oneMKL libraries that use "DALConfig" and "MKLConfig", respectively. Since the common pattern in cmake is the use the uppercase names, and cmake is recently promoting case-sensitivity, it would be nice if one could write:

find_package(MKL)
find_package(DAL)
find_package(IPP)

It looks not so nice and not so consistent with the lowercase name:

find_package(MKL)
find_package(DAL)
find_package(ipp)
# is this also lowercase or uppercase? Better uppercase everywhere?
if(MKL_FOUND and DAL_FOUND and ipp_FOUND)
    ...

Thanks for your consideration.

0 Kudos
Reply