KhronosGroup / KhronosGroup/SPIRV-Tools

Ignore PythonInterp requirement in cmake when SPIRV_SKIP_TESTS not set

Open
#3,346 0 comments 1 reaction 1 assignee Claimed by @s-perron View on GitHub
dev:building
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

https://github.com/KhronosGroup/SPIRV-Tools/blob/dd3d91691f1e1dc4c0f42818756cf5e165c8918c/CMakeLists.txt#L191

The comment above this line says "Tests require Python3", so the `PythonInterp` package should not be required when tests will not be added, which they are not when `SPIRV_SKIP_TESTS` is set.

Also, the comment is about `Python3`, but the code requires `PythonInterp`, which is a different package. Is `Python3` required as well, or instead of `PythonInterp`? My project uses `Python3` version 3.7.5 in one part and `PythonInterp` version 2.7.5 in another part.

Suggested change:
```
if (NOT "${SPIRV_SKIP_TESTS}")
find_host_package(PythonInterp 3 REQUIRED)
endif()
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.