-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake -H
to generate build files?
#2053
Comments
it looks like it should have been replaced by
|
Actually, -S was added to CMake later. We need to revert the PR. |
First of all, those people should upgrade. Second of all, you shouldn't penalize responsible users who keep their tools up to date (reverting that patch broke 3.21).
Finally, if you want something documented that will work on every version, use this command:
|
I agree, but it doesn't change the fact that tons of people use the default Ubuntu packages.
This didn't seem to be broken in our testing even with the newer CMake version. Are you experiencing a problem with it? It shouldn't be too hard to check the version of CMake before choosing which switch to use. We'd accept a PR if someone wants to do it now. But because we didn't see it broken in our testing, we didn't do it immediately. |
On Ubuntu
I have some bandwidth to fix this... |
The -H flag is an undocumented feature that was never supposed to be used by the public. This commit makes the drivers use the appropriate methods of configuring depending on the CMake version they handle: Legacy: The binary directory has to be created first and CMake must be invoked with that folder as its working directory. The source directory is passed without any flags. ServerAPI: The binary directory was already ensured to exist. No changes necessary. FileAPI: The driver for this assumes CMake >= 3.15, so the -S and -B flags can be used. These flags were introduced in CMake 3.13. Fixes: microsoft#2053
The -H flag is an undocumented feature that was never supposed to be used by the public. This commit makes the drivers use the appropriate methods of configuring depending on the CMake version they handle: Legacy: The binary directory has to be created first and CMake must be invoked with that folder as its working directory. The source directory is passed without any flags. ServerAPI: The binary directory was already ensured to exist. No changes necessary. FileAPI: The driver for this assumes CMake >= 3.15, so the -S and -B flags can be used. These flags were introduced in CMake 3.13. Fixes: microsoft#2053
The -H flag is an undocumented feature that was never supposed to be used by the public. This commit makes the drivers use the appropriate methods of configuring depending on the CMake version they handle: Legacy: The binary directory has to be created first and CMake must be invoked with that folder as its working directory. The source directory is passed without any flags. ServerAPI: The binary directory was already ensured to exist. No changes necessary. FileAPI: The driver for this assumes CMake >= 3.15, so the -S and -B flags can be used. These flags were introduced in CMake 3.13. Fixes: #2053 Co-authored-by: friendlyanon <[email protected]>
Brief Issue Summary
The extension uses
cmake -H/path/to/source
to generate the build files. However, this flag is not documented in the CMake Docs as far as I know.Expected:
The extension should use
cmake -S/path/to/source/
to generate the build files. The-H
flag is documented here and is only for printing the help text. See here for the question I asked about it on Stack Overflow.CMake Tools Log
With
Clang 10.0.0 x86_64-pc-linux-gnu
kit:With
GCC 10.2.0 x86_64-pc-linux-gnu
kit:Platform and Versions
The text was updated successfully, but these errors were encountered: