Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,187
    • Issues 3,187
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #18990

Closed
Open
Opened Feb 26, 2019 by Artalus@ArtalusContributor

FindPython doesn't create Python2::Python target when configuring during build (Windows, 3.14 rc2)

First encountered at my colleague's PC at work, then reproduced by myself at home. MWE:

cmake_minimum_required(VERSION 3.12)
project(xxx)

find_package(Python2 COMPONENTS Development REQUIRED)
if(NOT TARGET Python2::Python)
    message(FATAL_ERROR "NOT FOUND")
endif()
add_library(x x.cpp)

If I change CMakeLists and do a simple configure via cmake . - everything is OK. However, if I change it and do cmake --build . instead -- there will be no target Python2::Python. Other find-modules seem to work just fine.

Happens to me only with 3.14 rc2 on Windows -- on ArchLinux I couldn't reproduce it neither with pre-built binaries from the website, nor with cmake-git AUR package. Downgrading to 3.13.4 on Windows fixes the problem.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
3.14.0
Milestone
3.14.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#18990