Wrong C++ compiler version reported by Python build process

I’m invoking my Python build process, using the following command:

CMAKE_ARGS="-DLLVM_DIR=/usr/local/opt/llvm/lib/cmake/llvm 
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang 
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++" \
python setup.py --run_cmake --release install

And I’m seeing this in the resultant output:

-- ******** Summary ********
--   CMake version         : 3.17.3
--   CMake command         : /usr/local/Cellar/cmake/3.17.3/bin/cmake
--   System                : Darwin
--   C++ compiler          : /usr/local/opt/llvm/bin/clang++
--   C++ compiler version  : 7.1.0

But, that’s not the right version number:

$ /usr/local/opt/llvm/bin/clang++ --version
clang version 8.0.1 (tags/RELEASE_801/final)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin

Does anyone know why this might be happening?