-
-
Notifications
You must be signed in to change notification settings - Fork 35
Add support for macOS X host to CMakePresets.json #16
Conversation
|
Thank you. I need to independently confirm that these work on my Mac, but I think this will be a quick approval from me. |
Codecov Report
@@ Coverage Diff @@
## main #16 +/- ##
=======================================
Coverage 77.77% 77.77%
=======================================
Files 3 3
Lines 36 36
Branches 19 19
=======================================
Hits 28 28
Misses 7 7
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
|
Comment from the previous PR:
CMake presets supports an 'inList' operator that I think you could use. You can check if 'host os' is 'inList' that includes Linux and Mac. Docs here https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#condition |
Currently the only supported Unix-like OSes are: - Linux; - Darwin-based OSes, such as macOS X.
|
@ddalcino Great thanks, I did not realize that CMakePresets.json was actually a CMake thing, not a VSCode thing :-) The PR was updated to have shared presets for Unix-like OSes. Should be possible to add BSD, MINIX, QNX, etc. into the list. Unfortunately I don't have any of them at hand to try. |
I'm not certain, but I don't think we need to whitelist the operating systems for this preset. Maybe it would be sufficient to check that the host OS I don't want to go too far into testing every operating system out there; that's going to be super hard to support long-term. What does everyone else think? |
|
I think that there are a lot of operating systems out there. Some of them are not Windows-like and at the same time they are not Unix-like. For example FreeDOS, BeOS/Haiku. From my experience, the fact that an OS has the required toolchain, does not mean that the project can be built for it. I'd prefer to have a list of officially supported OSes, so that I can at least reason about the amount of effort that will go into me using the library/software. |
Good point, you're probably right. Our Conan dependencies definitely do not support other OSes. |
|
I am also in favor of restricting the supported OSes in "big three". If you run an unsupported OS you still have the option to use dev container with this template. Thus, if you can install docker and VSCode (with Remote-Containers plugin) to the unsupported OS you can set up a working environment with one click! Another option someone has is to add CMakeUserPresets.json file for some unique use cases. |
|
@Jason5480 I've attempted to add you as a reviewer, but github is not allowing me to, for some reason I cannot figure out at the moment. But once you and @ddalcino agree this is ready, I'm happy to merge it, or @ddalcino can merge it. |
ddalcino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I have tested this manually on a Mac with VS Code, and everything is working fine.
@lefticus, I would love to merge this, but apparently, I do not have write access to the cpp_boilerplate_project. I can't even give an approving review that satisfies the review requirement. |
Hi everyone,
This PR has been migrated from cpp-best-practices/cmake_template#7
It tries to solve the following issue: Linux and Windows configure presets cannot be used with Darwin-based platforms (such as macOS X). The discussion started in the ftxui_template project may be still relevant here.