If you set 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.
There is a way of not working with command line options at all, but defining them in a profile. For example, we could provide a 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 as openql-tests-release, and then build with conan build . -pr=openql-tests-release.
Current build line looks something like:
As a result of the conversation for this issue that I opened, I've found out that we could turn it into something like:
Explanation (see also here):
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
.