Skip to content
This repository has been archived by the owner on Jul 19, 2018. It is now read-only.

Error updating external sources if VS 2017 can't be located #2623

Open
gwihlidal opened this issue Apr 29, 2018 · 2 comments
Open

Error updating external sources if VS 2017 can't be located #2623

gwihlidal opened this issue Apr 29, 2018 · 2 comments
Assignees
Labels

Comments

@gwihlidal
Copy link

update_external_sources.bat attempts to locate Visual Studio with some PATH checks in determine_vs_version.py, and this fails on machine with only VS 2017 installed:

PS H:\Repositories\Vulkan-LoaderAndValidationLayers> .\update_external_sources.bat
Determining VS version
Detected Visual Studio Version as 00 0000
Generating 64-bit Glslang CMake files for Visual Studio 00 0000 -DCMAKE_INSTALL_PREFIX=install ..
CMake Error: Could not create named generator Visual Studio 00 0000 Win64

However, running cmake directly from the same terminal, and specifying VS works fine:

PS H:\Repositories\Vulkan-LoaderAndValidationLayers\build> cmake -G "Visual Studio 15 2017 Win64" ..
-- The C compiler identification is MSVC 19.12.25835.0
-- The CXX compiler identification is MSVC 19.12.25835.0

It seems like the VS locator should either be replaced with relying on cmake itself to find Visual Studio, or use vswhere (https://github.com/Microsoft/vswhere). Alternatively, fall back to these if methods if the script doesn't find VS.

The build instructions do say Open a Developer Command Prompt for VS201x, but it would be nicer to not have this requirement, as cmake itself doesn't require this.

@mark-lunarg mark-lunarg self-assigned this Apr 29, 2018
@mark-lunarg
Copy link
Collaborator

These are great suggestions -- I've never been a fan of that script though I think it might have at least one side-purpose. Either way, it's possible we could deprecate it or at least avoid using it for the main build. This is great timing, the repo structure and CMake files are getting a thorough scrub and cleanup. Thanks!

@DominikWitczakAMD
Copy link
Contributor

Oh yes, +1 to this. Every time I have to build the layers from a freshly checked out repo, this one incites a heavy sigh in my cubicle.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants