fix issue in IPP search algorithm (when no IPPROOT available in system and IPP is installed)
This commit is contained in:
parent
767af0f2a7
commit
c72466c439
@ -260,14 +260,14 @@ endfunction()
|
|||||||
# Note, if several IPP installations found the newest version will be
|
# Note, if several IPP installations found the newest version will be
|
||||||
# selected
|
# selected
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
foreach(CURDIR ${CMAKE_SYSTEM_PREFIX_PATH})
|
foreach(curdir ${CMAKE_SYSTEM_PREFIX_PATH})
|
||||||
set(CURDIR ${CURDIR}/intel)
|
set(curdir ${curdir}/intel)
|
||||||
file(TO_CMAKE_PATH ${CURDIR} CURDIR)
|
file(TO_CMAKE_PATH ${curdir} CURDIR)
|
||||||
|
|
||||||
if(EXISTS ${CURDIR})
|
if(EXISTS ${curdir})
|
||||||
file(GLOB_RECURSE IPP_H_PATH ${CURDIR}/ippversion.h)
|
file(GLOB_RECURSE IPP_H_DIR ${curdir}/ippversion.h)
|
||||||
|
|
||||||
if(IPP_H_PATH)
|
if(IPP_H_DIR)
|
||||||
set(IPP_FOUND 1)
|
set(IPP_FOUND 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ endfunction()
|
|||||||
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
|
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
|
||||||
|
|
||||||
# look through all dirs where ippversion.h was found
|
# look through all dirs where ippversion.h was found
|
||||||
foreach(item ${IPP_H_PATH})
|
foreach(item ${IPP_H_DIR})
|
||||||
|
|
||||||
# traverse up to IPPROOT level
|
# traverse up to IPPROOT level
|
||||||
get_filename_component(_FILE_PATH ${item} PATH)
|
get_filename_component(_FILE_PATH ${item} PATH)
|
||||||
@ -285,15 +285,14 @@ endfunction()
|
|||||||
# extract IPP version info
|
# extract IPP version info
|
||||||
get_ipp_version(${_ROOT_DIR})
|
get_ipp_version(${_ROOT_DIR})
|
||||||
|
|
||||||
|
# remember the latest version (if many found)
|
||||||
if(${IPP_LATEST_VERSION_STR} VERSION_LESS ${IPP_VERSION_STR})
|
if(${IPP_LATEST_VERSION_STR} VERSION_LESS ${IPP_VERSION_STR})
|
||||||
# if(${IPP_LATEST_VERSION_STR} VERSION_GREATER ${IPP_VERSION_STR})
|
|
||||||
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
|
set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR})
|
||||||
set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
|
set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR})
|
||||||
set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
|
set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR})
|
||||||
set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})
|
set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD})
|
||||||
set(IPP_ROOT_DIR ${_ROOT_DIR})
|
set(IPP_ROOT_DIR ${_ROOT_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
@ -301,3 +300,13 @@ endfunction()
|
|||||||
# set IPP INCLUDE, LIB dirs and library names
|
# set IPP INCLUDE, LIB dirs and library names
|
||||||
set_ipp_variables(${IPP_LATEST_VERSION_STR})
|
set_ipp_variables(${IPP_LATEST_VERSION_STR})
|
||||||
|
|
||||||
|
# set CACHE variable IPP_H_PATH,
|
||||||
|
# path to IPP header files for the latest version
|
||||||
|
find_path(
|
||||||
|
IPP_H_PATH
|
||||||
|
NAMES ippversion.h
|
||||||
|
PATHS ${IPP_ROOT_DIR}
|
||||||
|
PATH_SUFFIXES include
|
||||||
|
DOC "The path to Intel(R) IPP header files"
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
NO_CMAKE_PATH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user