-
Notifications
You must be signed in to change notification settings - Fork 47
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
README mini build & install guide #499
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why does the C++ standard has to be specified in this command?
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.
I approve of the review btw, but it's already merged anyway
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.
Good question Pablo. I think it is not enough specifying it in the CMake file. I think to remember having some compiling issues for not specifying it. However, I'm not 100% sure so I'm going to double check this, maybe remove it in a future. Thanks!
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.
Yes, sorry about that. I saw that Hans approved the PR this morning, so I quickly merged it, thinking it wasn't dangerous to have it in.
Anyway, I still have to work out with your help:
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.
I have just checked. Without specifying the version, Conan tried to use C++11.
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.
I'm absolutely fine with the merging of this PR :) ! Was just curious
Ah, weird, maybe there's a setting in some Conan file that you can use instread of having to specify it on the command line?
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.
I think so. Profiles may help here. You should be able to pack all the options together in a profile, let's say
x64-linux-debug
, and then run it the next way:conan build . -pr x64-linux-debug
.Actually, for what I've just read, you could edit the default profile (the one that is created after doing
conan profile detect
), to set the compiler (for example). So you would do that once for each of your development machines.This is one of the things I miss the most from CMake. If you have a look at this project of mine, you will see that I was configuring and building it like this:
Those presets were defined in a
CMakePresets.json
file. You could define some base presets, then specialize them, defining different options for each one...Anyway, thanks for the comment because those Conan command lines we have at the moment are very unattractive. I know one can always create bash aliases, e.g.
build_openql_debug
or whatever, but it would be great to just download something and build it with a shorter command.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.
A little update on this conversation.
I have started using a CLion's Conan plugin, and as a result of the conversation for this issue that I opened, I've found out that:
CMAKE_CXX_STANDARD
in your project, you don't need to pass the compiler version as a command line parameter. I've noticed we were not doing that in OpenQL.conan/profiles
folder together with the code, including a set of predefined profiles, e.g.tests-release
, which would look something like:And then just compile with
conan build . -pr=conan/profiles/tests-release
.Or, these profiles may be copied to the
~./conan2/profiles
folder, e.g. for this case, with a name such asopenql-tests-release
, and then build withconan build . -pr=openql-tests-release
.I'll create a separate PR for addressing these two changes. I think the second one can simplify a lot the user experience.