llnl / llnl/blt

built-in gtest cmake find python order of operations suprise

Open
#605 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.