built-in gtest cmake find python order of operations suprise
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 296
- Forks
- 66
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
In most projects, we use `PYTHON_EXECUTABLE` to point to python.
In VisIt we use `PYTHON_DIR` and have logic to derive `PYTHON_EXECUTABLE` from that.
B/c of this difference - I discovered that gtest will in fact go on to find *a* python if `PYTHON_EXECUTABLE` is not set.
gtest's logic lead to VisIt finding the wrong python.
To protect against this, I had to make sure that `PYTHON_EXECUTABLE` was set before calling BLT.
BLT should defend against this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing BLT's CMake setup and its built-in gtest integration, focusing on when Python discovery occurs relative to the BLT call. Reproduce the configuration with PYTHON_DIR set but PYTHON_EXECUTABLE unset, then verify that the selected Python remains the intended one before gtest performs discovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100