Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Peguen
Copy link
Contributor

@Peguen Peguen commented Mar 12, 2025

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.

@Peguen Peguen added the cherry-pick-to-NONE Don't cherry-pick these changes label Mar 12, 2025
Copy link
Contributor

@KerstinKeller KerstinKeller left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member

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?

Copy link
Contributor Author

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");
Copy link
Contributor

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.

Copy link
Contributor Author

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

@Peguen Peguen requested a review from KerstinKeller March 12, 2025 14:20
@FlorianReimold
Copy link
Member

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 set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) anymore?

@Peguen
Copy link
Contributor Author

Peguen commented Mar 13, 2025

Docu adaptions will be done in a separate PR I am working on.

Regarding the CMAKE_FIND_PACKAGE_PREFER_CONFIG refer to #2009 .

@Peguen Peguen merged commit 3225020 into master Mar 13, 2025
26 checks passed
@Peguen Peguen deleted the feature/doc_use_regular_samples branch March 13, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-to-NONE Don't cherry-pick these changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants