Repository navigation
Commit 8509117
committed
CMakeLists.txt: locate pyscf with the build interpreter, from the build directory, or fail
Reworked along the review of 25 September: the pyscf lookup stays in one place
(pyscf/lib/CMakeLists.txt) and runs with the interpreter the build runs under
(find_package(Python); setup.py passes -DPython_EXECUTABLE=sys.executable),
from the build directory instead of the checkout, and fails with a clear message
when pyscf is not found or has no lib/config.h.in. PYSCF_SOURCE_DIR is a CACHE PATH
instead of an option(). cmake_minimum_required 3.5 -> 3.12 for find_package(Python).
Configure step tested on Linux (CMake 4.2):
- /usr/bin/python3 (no pyscf) first on PATH, run from the checkout, no -DPython_EXECUTABLE:
before, "Include pyscf source dir: <checkout>/pyscf" and config.h.in does not exist;
now, "Could not locate an installed pyscf using /usr/bin/python3".
- -DPython_EXECUTABLE=<env>/bin/python: "Include pyscf source dir: <env>/site-packages/pyscf", configuring done.1 parent 1f1b65f commit 8509117
2 files changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | | - | |
100 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
101 | 112 | | |
102 | 113 | | |
103 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
0 commit comments