-
Notifications
You must be signed in to change notification settings - Fork 50
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
[feature request] Switch toolchain or corss-file on GUI #151
Comments
The problem with that is, Meson machine files aren't recognizable in the sense that they don't have a special file name or anything. |
"CMake Tools" extension uses a specific Json file to record all the toolchains and "toolchain files". When we select a toolchain, it is actually selecting an object from that Json file, "CMake Tools" will load that object and parse the information. I think this is also applicable to the "vscode-meson". |
In CMake that file is well known. It has a specific name. We don't enforce names for machine files, for better or for worse. |
The file I mentioned does NOT belong to cmake, it is created by the "CMake Tools", in my PC, the path to it is "C:\Users\zzh\AppData\Local\CMakeTools\cmake-tools-kits.json" . It is neither a "CMakeUserPresets.json" nor a "CMakePresets.json", it is just a configuration file specific for the "CMake Tools" extension. What I mean is, could we create a "meson-crossfile.json" file specific for "vscode-meson" extension, in this file we write something like this {
"gcc": "/home/zzh/toolchains/gcc.ini",
"clang": "/home/zzh/toolchains/clang.ini"
} The "gcc" and "clang" are custom names for GUI items, the "/home/zzh/toolchains/gcc.ini" is the path to the machine file, the "meson-crossfile.json" is a specific name. There is no need to enforce the name for machine files. |
Could you provide a screenshot/video of the CMake extension doing this? I am having trouble understanding. |
I like the idea of having a set of cross files and an easy way to click which platform to build for. Meson itself should probably install/provide some of its cross files: https://github.com/mesonbuild/meson/tree/master/cross. The list could then be extended by user entering full path to its custom cross files. An extra step meson-vscode can take is to append arch/platform to the builddir, e.g. selecting mingw cross file will automatically build into |
I like this idea quite a bit. Doesn't Meson itself also look in some XDG dir for machine files? |
unknown_2023.08.19-10.49_2.mp4This is a demo for "CMake Tools". |
@tristan957 I like this solution too. It is not necessary to do everything like "CMake Tools" does. |
I hope there is a select box on vscode GUI to select the toolchain or cross-file to use, and this selected file should be appended as an argument to meson command line, just like the "CMake Tools" does(extension id: ms-vscode.cmake-tools)
The text was updated successfully, but these errors were encountered: