mirror of https://github.com/llvm/circt.git
[ESI] Always find_package Python3 Development (#8778)
AFAICT, pybind11 v. 3.0.0 (release 2 weeks ago) changed a bit how modules are being defined. A result of that is that it's not sufficient to just look for `Python3_FOUND`. That can be evident when e.g. building the ESI runtime alongside the rest of CIRCT, if python bindings are _not_ enabled. In that case [here](https://github.com/llvm/circt/blob/main/CMakeLists.txt) the top-level CMakeLists won't look for the Python3 `Development` component... I'm a bit surprised that this isn't done inside the pybind11 cmake files, but oh well... the problem is fixed by always `find_package`'ing for both `Interpreter` and `Development` in the ESI runtime CMakeLists.txt. Also sneaks in a .gitignore for the `ESI/runtime` library, to better support in-tree builds of just the runtime. Co-authored-by: Morten Borup Petersen <mpetersen@microsoft.com>
This commit is contained in:
parent
0a79297ac2
commit
2696da0895
|
@ -0,0 +1 @@
|
|||
/build*
|
|
@ -283,9 +283,7 @@ add_dependencies(ESIRuntime esitester)
|
|||
##===----------------------------------------------------------------------===//
|
||||
|
||||
# Pybind11 is used to wrap the ESICppRuntime APIs.
|
||||
if(NOT DEFINED Python3_FOUND)
|
||||
find_package(Python3 COMPONENTS Interpreter Development)
|
||||
endif()
|
||||
find_package(Python3 COMPONENTS Interpreter Development)
|
||||
if(Python3_FOUND)
|
||||
IF(MSVC)
|
||||
# Work around an issue with pybind11 and cmake incompatibility on Windows in debug mode.
|
||||
|
|
Loading…
Reference in New Issue