Skip to content
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

fix cmake presets naming chaos #2

Closed
wants to merge 3 commits into from
Closed

fix cmake presets naming chaos #2

wants to merge 3 commits into from

Conversation

ClausKlein
Copy link

preset names have it own scope.
use simple and short names were possible

ClausKlein and others added 3 commits April 6, 2022 08:06
preset names have it own scope.
use simple and short names were possible
@ClausKlein
Copy link
Author

NOTE: tested only with gcc and clang on OSX!

  cmake -S . --preset=unixlike-clang
  cmake --build --preset=clang-release
  cmake --build --preset=clang-release --target install
  ctest --preset=clang-release

},
{
"name": "config-windows-common",
"name": "windows-common",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the hidden presets that are used to compose the non-hidden presets (using the "inherits") I would prefer to keep the prefix type to prevent any misuse. Those hidden names are not visible to the end user anyway.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure, build, and test preets are independent namespaces!

you can't inherit a build preset from a configure preset AFAIK!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats' a good point. I changed them all in the most recent version!

@@ -0,0 +1,1313 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary? The "version" at the start of the preset file should be enough to define the correct schema.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the use want to change the User preset, this schema file is needed to verfiy the preset.
cmake does not help if the preset is invalid!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know that. It should be very helpful for debugging. I am sorry but the time I noticed your PR there were just too many conflicts to resolve before the merge... Do you mind doing another PR with this file directly to the cpp_boilerplate_project? I am sorry again that I missed that.

"displayName": "Release",
"description": "Set Strict rules for windows msvc (User Mode) release tests",
"inherits": "test-common-release",
"inherits": "common-release",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done most of the changes you suggested in the most recent commits. If you have anything else in mind that will help future users, please comment in my PR to the upstream cpp_boilerplate_project cpp-best-practices#19 so we can merge it with other open cmakepresets issues we have.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO: to long to write on concole!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ClausKlein
Copy link
Author

I have tested this version, you have to test your version again on each host!

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

Successfully merging this pull request may close these issues.

2 participants