Skip to content

Pass configuration options to Cmake ? #7500

Closed
@kulicuu

Description

@kulicuu

edit This was with stable at v1.38. Trying now with nightly, there is no issue, maybe because the cmake dependency is handled differently (#6368) ?

edit2 Still having this issue with cmake in new builds, even with nightly build.

edit3 I've been able to 'solve' this by hiding my Python27 directory, deleting the /target dir and building from scratch. Of course I have software depending on Python27 being there, so it would be better to be able to granularly configure Cmake through Cargo for this.

edit4 I'm considering the possibility that I will need to look into invocation of Cmake from the Vulkano stuff rather than directly through Cargo. This may not be a Cargo issue at all in that case.

I'm running cargo run --bin [...] on a Vulkano example, and getting a Python version error:

CMake Error at C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find PythonInterp: Found unsuitable version "2.7.16", but
  required is at least "3" (found C:/Python27/python.exe)
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE)
  C:/msys64/mingw64/share/cmake-3.15/Modules/FindPythonInterp.cmake:160 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  spirv-tools/CMakeLists.txt:176 (find_package)
  spirv-tools/CMakeLists.txt:186 (find_host_package)

I've got my system environment variables configured, path is good to Python3, and even tried an alias. Now looking to configure the cmake execution, but can't find a way to do this cargo and/or rustc, at least documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions