Improve version matching for find_package
Hi,
when running find_package ( Python 3 REQUIRED COMPONENTS Interpreter )
and later the googletest subdirectory calls find_package(Python COMPONENTS Interpreter)
, CMake actually searches twice on each run:
1>-- Found Python: C:/RsPython/3.9/python.exe (found version "3.9.5") found components: Interpreter
1>-- Found Python: C:/RsPython/3.9/python.exe (found suitable version "3.9.5", minimum required is "3") found components: Interpreter
It is obvious from the outside that the requirements of each call to find_packge are already satisfied by the found python interpreter.