Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,105
    • Issues 4,105
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #21639
Closed
Open
Issue created Dec 28, 2020 by Tim Sparkles@timbojones

VS: CMake does not find portable instance

Repro:

  1. Install Visual Studio Build Tools
  2. Copy the contents of the install directory (e.g. c:\program files (x86)\Microsoft Visual Studio\2019\BuildTools) to a version-controlled location, e.g. c:\depot\buildtools
  3. cmake -DCMAKE_GENERATOR_INSTANCE=c:\depot\buildtools

Expected result: cmake finds the build tools in the specified location

Actual result:

  • cmake doesn't even look in the specified location (confirmed with procmon.exe)
  • "could not find specified instance of Visual Studio"

One of our engineering pillars is that we can build and run our software having only a version control client installed on the build machine. It seems that cmake expects Visual Studio to be fully installed, and enforces this by querying C:\ProgramData and the registry. These queries should not be necessary when a specific instance location is explicitly provided.

Edited Jan 04, 2021 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking