Skip to content
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

doc: Improve cmake README and INSTALL docs #1448

Conversation

ChihweiLHBird
Copy link

@ChihweiLHBird ChihweiLHBird commented Jul 13, 2024

Description

Making the README more clear for beginner C++ developers (like me).

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • bug fix - change that fixes an issue
  • new feature - change that adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

List users with @ to send notifications

Other information

@dnmokhov dnmokhov requested a review from aepanchi July 13, 2024 21:52
cmake/README.md Outdated Show resolved Hide resolved
cmake/README.md Outdated

```bash
mkdir /tmp/my-build
cd /tmp/my-build
```

Or you may also create a build directory within the oneTBB source directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

Purpose of this addition is not clear. A temporary build directory can be created in an arbitrary location - this is what is stated in the original message above.

Probably it is worth to add a better example instead of changing the general instructions.

Copy link
Author

Choose a reason for hiding this comment

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

Yea. What do you think about changing the examples here to be out of source build?

Copy link
Author

Choose a reason for hiding this comment

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

Also, the install doc refers .. location multiple times as the repo directory, which implies the build directory is a sub-directory of the repo directory. This might need to be updated as well.

@ChihweiLHBird ChihweiLHBird force-pushed the zhiwei/improve-cmake-readme branch 2 times, most recently from b63e220 to 1ad310a Compare July 16, 2024 20:16
@ChihweiLHBird ChihweiLHBird requested a review from omalyshe July 16, 2024 20:16
@ChihweiLHBird
Copy link
Author

I just updated it to address some concerns, let me know if you have other suggestions. Thanks!

@ChihweiLHBird ChihweiLHBird changed the title doc: Improve cmake README doc: Improve cmake README and INSTALL docs Jul 17, 2024
INSTALL.md Outdated Show resolved Hide resolved
cmake/README.md Outdated Show resolved Hide resolved
cmake/README.md Outdated
@@ -35,8 +35,10 @@ cd /tmp/my-build

### Configure

In the build directory, specify the oneTBB source directory to generate a build system for it.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't personally think that this comment adds useful information here. Flow of this README already implies that the user's current working directory to be the build directory after the steps from "Preparation" section.

Copy link
Contributor

Choose a reason for hiding this comment

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

agree

Copy link
Author

@ChihweiLHBird ChihweiLHBird Jul 18, 2024

Choose a reason for hiding this comment

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

It might be the case for users who are familiar with cmake, but for users who don't, it can be very confusing because they have no idea why running an unfamiliar command in an empty directory and what does it do.

In many open-source community projects, the assumption of docs usually is that users are complete beginners for those tech stack and tooling.

Copy link
Author

Choose a reason for hiding this comment

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

But if you guys strongly against it, feel free to suggest a change and I will follow.

Copy link
Contributor

@isaevil isaevil Jul 18, 2024

Choose a reason for hiding this comment

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

https://github.com/oneapi-src/oneTBB/blob/master/cmake/README.md#configure-build-and-test is a step-by-step guide to configure, build and test oneTBB. So the document is assuming that the reader follows it from top to bottom.
I think you could probably replace <repo_root> by <onetbb_repo_directory> and add From the build directory, run: as it has been done for INSTALL.md. Will it help?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the idea! How does it look now?

Copy link
Author

@ChihweiLHBird ChihweiLHBird Jul 22, 2024

Choose a reason for hiding this comment

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

And yes, it's fine to assume the developer is reading from top to bottom; however, in my opinion, it's also very import to descript what each step does in a README doc rather than just put a bunch of commands for the developer to run without explanations, especially for cmake and C++ which has a very different build workflow than other common programming languages (e.g., Java, Python, Go).

cmake/README.md Outdated Show resolved Hide resolved
cmake/README.md Outdated
@@ -35,8 +35,10 @@ cd /tmp/my-build

### Configure

In the build directory, specify the oneTBB source directory to generate a build system for it.
Copy link
Contributor

Choose a reason for hiding this comment

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

agree

@ChihweiLHBird ChihweiLHBird force-pushed the zhiwei/improve-cmake-readme branch from 39ba3a8 to 39597d9 Compare July 18, 2024 14:34
@ChihweiLHBird ChihweiLHBird deleted the zhiwei/improve-cmake-readme branch July 26, 2024 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants