-
Notifications
You must be signed in to change notification settings - Fork 197
[doc] Collect doc samples according to "repo standard" and enable build #2076
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
KerstinKeller
left a comment
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.
Looks good, but please see my comments...
| * |fa-file-alt| :file:`CMakeLists.txt`: | ||
|
|
||
| .. literalinclude:: src/hello_world/hello_world_snd/CMakeLists.txt | ||
| .. literalinclude:: ../source_code_samples/cpp/string/hello_world_snd/CMakeLists.txt |
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.
Is it possible to provide "absolute" path, e.g. absolute to doc path, in case we move the hello_world.rst file to a different folder?
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
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.
Is that path still correct? Shouldn't it be /../samples/cpp/string/hello_world_snd/CMakeLists.txt? Or am I missing something?
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.
The build happens with the copied src files in the _sources subfolder in the build. Now when we speficy /source_code_samples/... it takes the _sources subfolder as root and with that its not relative to the *.rst file anymore.
| // Configuration based on previous ini file will be overwritten. | ||
| // The new Configuration will use default values if the file is not found | ||
| // in the default directories (ECAL_DATA, cwd, %LOCALAPPDATA%/eCAL, $HOME/.ecal) | ||
| custom_config.InitFromFile("./ecal_custom.yaml"); |
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 would rather show the default way to get the configuration, which would be auto config = eCAL::Init::GetConfiguration().
We could still mention that you can init from a file, but the first option would be the preferred way to retrieve the config.
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.
Lets mention that in the documentation
|
The sample code has changed, so now the documentation around it also has to change. What is the reason why we don't need the |
|
Docu adaptions will be done in a separate PR I am working on. Regarding the CMAKE_FIND_PACKAGE_PREFER_CONFIG refer to #2009 . |
Description
Previously, sample sources in the documentation were stored in a relative src file to the document. This is now changed in order to maintain an equivalent directory structure like in the other components of eCAL.
In addition, previously in integration tests it was noticed, that the sample sources could not be build. Now there is the option to enable their build with ECAL_BUILD_DOC_SAMPLES turned to "ON", which is now the default setting in the documentation workflow.