Skip to content

CMake: Add documentation about CMakeLists.txt file #1434

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

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

hugueskamba
Copy link
Contributor

Add documentation to explain how CMakeLists.txt file
are used in Mbed OS.

@hugueskamba hugueskamba requested a review from 0xc0170 March 22, 2021 14:41
@hugueskamba hugueskamba force-pushed the hk_feature-cmake-docs_overview branch from 28c9170 to 1eee139 Compare March 22, 2021 16:00
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

LGTM once fixed


## Library configuration
Source files are included in libraries by listing them in `CMakeLists.txt` files using `target_sources()`. Some source code are provided in Mbed as pre-built libraries and are added to libraries using `target_link_libraries()`. `target_link_libraries()` is also used to link other Mbed libraries if there are dependencies.
Header files are included by listing the directories where they are found using `target_include_directories()`. Additionally, compile defintions are added to libraries using `target_compile_defintions()`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Header files are included by listing the directories where they are found using `target_include_directories()`. Additionally, compile defintions are added to libraries using `target_compile_defintions()`.
compile defintions are added to libraries using `target_compile_definitions()`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not understand the suggestion. Are you suggesting to remove talking about target_include_directories()? If so, why?

Copy link
Contributor

Choose a reason for hiding this comment

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

defintions typo

Copy link
Contributor

Choose a reason for hiding this comment

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

The suggestion was incorrect 🤦

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Add documentation to explain how CMakeLists.txt file
are used in Mbed OS.
@hugueskamba hugueskamba force-pushed the hk_feature-cmake-docs_overview branch from 1eee139 to 0cd3f1d Compare March 23, 2021 13:21
@0xc0170 0xc0170 merged commit c04c4cc into feature-cmake-docs Mar 23, 2021
@hugueskamba hugueskamba deleted the hk_feature-cmake-docs_overview branch March 24, 2021 11:01
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.

2 participants