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 command line examples #521

Open
wants to merge 1 commit into
base: wip
Choose a base branch
from

Conversation

marcbutler
Copy link

@marcbutler marcbutler commented Sep 30, 2024

Correct cmake source directory option in examples.

Checklist

  • Have you followed the guidelines in our CONTRIBUTING.md document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you made sure that all tests succeed?

@BenKaufmann
Copy link
Contributor

I'd suggest being careful with this change.
While -S is meanwhile the correct option, it is only available since cmake version >= 3.13. On the other hand, the undocumented -H option is still available and was already supported in old versions like 3.1.

So, if we switch to -S, we should probably also update the minimal cmake version.

@marcbutler
Copy link
Author

I'd suggest being careful with this change. While -S is meanwhile the correct option, it is only available since cmake version >= 3.13. On the other hand, the undocumented -H option is still available and was already supported in old versions like 3.1.

Fair point. I found it confusing as -H is documented as help.

@marcbutler
Copy link
Author

I have no idea why appveyor failed: there was no functional change.

@rkaminsk
Copy link
Member

I have no idea why appveyor failed: there was no functional change.

It's unrelated to this PR. @BenKaufmann do you know what that could be?

/cygdrive/c/projects/clingo/clasp/libpotassco/tests/test_string_convert.cpp:371: FAILED:
  REQUIRE( std::strcmp(str.c_str(), "12.34 12.34") == 0 )
with expansion:
  -2 == 0

@rkaminsk
Copy link
Member

Otherwise, I think that we can update the docs for building with -S and -B. We are still compatible with cmake 3.1. Users will just have to adapt the options.

@BenKaufmann
Copy link
Contributor

It's unrelated to this PR. @BenKaufmann do you know what that could be?

/cygdrive/c/projects/clingo/clasp/libpotassco/tests/test_string_convert.cpp:371: FAILED:
  REQUIRE( std::strcmp(str.c_str(), "12.34 12.34") == 0 )
with expansion:
  -2 == 0

I recently re-enabled the "double parsing is locale-independent" test, which also seems to fail on cygwin.
From what I can see, it looks like on cygwin some locale name string that is valid for setlocale is not valid for std::locale. As a result, the global locale is not reset again correctly triggering further test failures later.

I have to investigate further but in any case, the test should at least always restore the global state.

@BenKaufmann
Copy link
Contributor

BenKaufmann commented Sep 30, 2024

@rkaminsk Cygwin issue is fixed in clasp/libpotassco dev branch.

@marcbutler
Copy link
Author

Otherwise, I think that we can update the docs for building with -S and -B. We are still compatible with cmake 3.1. Users will just have to adapt the options.

Would you like the PR to update the doc to indicate that the cli examples are for CMake 3.13 or later?

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.

3 participants