FindPython module modifies variable(s) with generic name(s) on initial configuration
When using FindPython module, variables with generic names like VERSION
are unpexpectedly modified. E.g. this script
cmake_minimum_required(VERSION 3.19.2)
project(foobar)
set(VERSION "1.0")
find_package(Python)
message(STATUS "VERSION: ${VERSION}")
will print this on initial configuration:
...
-- Found Python: /usr/bin/python3.9 (found version "3.9.1") found components: Interpreter
-- VERSION: 1.0;3
...
Reconfiguring the project afterwards gives expected output, but it should be noted that the initial configuration may not succeed in the first place because of the above behavior and that's currently reproducible with libxml2 master which uses VERSION
. Not sure what other variable names are affected.
May or may not be related to the fact that FindPython/Support.cmake makes use of _PGV_PREFIX
variable that doesn't seem to be defined anywhere.
Not reproducible with FindPython2 and FindPython3 modules.