mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Use uppercase OR when checking for system XNNPACK (#159527)
This PR fixes `cmake/Dependencies.cmake` to work when compiling with `USE_SYSTEM_XNNPACK=ON` by changing a lowercase `or` to an uppercase `OR`. --- For a personal project, I was building pytorch with a customized build of XNNPACK. When trying to do so I encountered the following error: ``` CMake Error at cmake/Dependencies.cmake:566 (if): if given arguments: "NOT" "XNNPACK_LIBRARY" "or" "NOT" "microkernels-prod_LIBRARY" Unknown arguments specified Call Stack (most recent call first): CMakeLists.txt:868 (include) ``` Upon making the change in this PR (changing `or` to `OR`), the process continued as expected. Pull Request resolved: https://github.com/pytorch/pytorch/pull/159527 Approved by: https://github.com/janeyx99
This commit is contained in:
committed by
PyTorch MergeBot
parent
8a2f53c523
commit
85d931f29e
@ -576,7 +576,7 @@ elseif(NOT TARGET XNNPACK AND USE_SYSTEM_XNNPACK)
|
||||
find_library(microkernels-prod_LIBRARY microkernels-prod)
|
||||
set_property(TARGET XNNPACK PROPERTY IMPORTED_LOCATION "${XNNPACK_LIBRARY}")
|
||||
set_property(TARGET microkernels-prod PROPERTY IMPORTED_LOCATION "${microkernels-prod_LIBRARY}")
|
||||
if(NOT XNNPACK_LIBRARY or NOT microkernels-prod_LIBRARY)
|
||||
if(NOT XNNPACK_LIBRARY OR NOT microkernels-prod_LIBRARY)
|
||||
message(FATAL_ERROR "Cannot find XNNPACK")
|
||||
endif()
|
||||
message("-- Found XNNPACK: ${XNNPACK_LIBRARY}")
|
||||
|
Reference in New Issue
Block a user