Skip to content

FindPython3.cmake unavailable before CMake 3.12 #1700

Closed

Description

@SimonRit

Description

I have a warning with cmake v3.11 since 07705bd (@thewtex), see RTK dashboard. That's because FindPython3.cmake is available since CMake 3.12 only. I'm not sure what's the strategy to fix it, either raise cmake minimal version or find a workaround backward compatible with cmake 3.10. I'm happy to help if I can...

Steps to Reproduce

Configure with cmake 3.11.

Expected behavior

Smooth cmake configuration

Actual behavior

Cmake warning

CMake Warning at D:/src/itk/ITK-master/CMake/ITKModuleExternal.cmake:22 (find_package):
  By not providing "FindPython3.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Python3", but
  CMake did not find one.

  Could not find a package configuration file provided by "Python3" with any
  of the following names:

    Python3Config.cmake
    python3-config.cmake

  Add the installation prefix of "Python3" to CMAKE_PREFIX_PATH or set
  "Python3_DIR" to a directory containing one of the above files.  If
  "Python3" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:257 (include)

Reproducibility

100%

Versions

07705bd

Environment

Tested on Windows but should occur on any platform.

Activity

  1. added
    type:Bug
    on Mar 12, 2020
  2. dzenanz commented on Mar 12, 2020

    @dzenanz
    Member
  3. thewtex commented on Mar 12, 2020

    @thewtex
    Member

    @SimonRit thanks for the report.

    It is too much of a burden for the community to install a newer CMake when they want to build ITK, so we cannot bump the CMake minimum version.

    We could vendor the FindPython3.cmake module. The version from 3.16 or later is the one that has the least worst behavior on Windows. We have to ensure that the module code is not using any CMake features that were introduced past 3.10.

  4. added this to the ITK v5.1rc03 milestone on Mar 12, 2020
  5. thewtex commented on Mar 16, 2020

    @thewtex
    Member

    Closing per #1072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions