Skip to content

Commit 85d931f

Browse files
benjaminhottellpytorchmergebot
authored andcommitted
Use uppercase OR when checking for system XNNPACK (pytorch#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: pytorch#159527 Approved by: https://github.com/janeyx99
1 parent 8a2f53c commit 85d931f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/Dependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ elseif(NOT TARGET XNNPACK AND USE_SYSTEM_XNNPACK)
576576
find_library(microkernels-prod_LIBRARY microkernels-prod)
577577
set_property(TARGET XNNPACK PROPERTY IMPORTED_LOCATION "${XNNPACK_LIBRARY}")
578578
set_property(TARGET microkernels-prod PROPERTY IMPORTED_LOCATION "${microkernels-prod_LIBRARY}")
579-
if(NOT XNNPACK_LIBRARY or NOT microkernels-prod_LIBRARY)
579+
if(NOT XNNPACK_LIBRARY OR NOT microkernels-prod_LIBRARY)
580580
message(FATAL_ERROR "Cannot find XNNPACK")
581581
endif()
582582
message("-- Found XNNPACK: ${XNNPACK_LIBRARY}")

0 commit comments

Comments
 (0)