-
Notifications
You must be signed in to change notification settings - Fork 188
Fix CMake variable usage #459
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
Conversation
... because using `option` will make it show up incorrectly as a checkbox in cmake-gui.
... to reflect proper CMake cache variable usage.
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.
Thanks for sharing. I'm learning something new about CMake every day ;).
I'm intrigued, what is the difference between cached variables and options in CMake? Is there a reason to prefer cached variables over options?
@awvwgk The online documentation for CMake on |
Also, the thing that made me recognize the issue in the first place is when I ran |
Thank you for this PR. I am learning something too. However, I think that Are there any other alternatives? |
The old syntax `-DCMAKE_MAXIMUM_RANK=4` should still work, albeit not
"standard-conforming".
…On Sun, Jul 11, 2021, 15:57 Jeremie Vandenplas ***@***.***> wrote:
Thank you for this PR. I am learning something too. However, I think that cmake
-DCMAKE_MAXIMUM_RANK:String=4 is not really intuitive, and more "complex"
than cmake -DCMAKE_MAXIMUM_RANK=4.
Are there any other alternatives?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#459 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMERY5CMW57H6WHD7ZPS25DTXHZTZANCNFSM5AFRYNCQ>
.
|
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.
Thank you for your explanations @wyphan . LGTM.
Fine with me also. |
Fine for @certik + 2 approvals, I'll merge. |
CMAKE_MAXIMUM_RANK
is now properly defined as a CMake cache variable of type string (even though it functions as an int). Thus, at configure time, it is passed on ascmake -DCMAKE_MAXIMUM_RANK:String=7
, for instance.I only changed the semantics of defining the variable -- use
set
instead ofoption
-- and updated the README file and CI workflows accordingly.