FindPython2 fails to find Development only
I use the following project:
cmake_minimum_required(VERSION 3.12)
project(Foo)
find_package(Python2 REQUIRED COMPONENTS Interpreter Development)
find_package(Python2 REQUIRED COMPONENTS Interpreter)
find_package(Python2 REQUIRED COMPONENTS Development)
This is the output I get:
-- Found Python2: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (found version "2.7.10") found components: Interpreter Development
-- Found Python2: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 (found version "2.7.10") found components: Interpreter
CMake Error at /usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Python2 (missing: Development) (found version "2.7.10")
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindPython/Support.cmake:799 (find_package_handle_standard_args)
/usr/local/Cellar/cmake/3.12.0/share/cmake/Modules/FindPython2.cmake:138 (include)
CMakeLists.txt:6 (find_package)
This is strange. Development has been found before. Isn't the result properly cached?