Skip to content

Updating with adding external library functionality and generation of…#1

Open
faberc wants to merge 3 commits into
maxpeng:masterfrom
faberc:master
Open

Updating with adding external library functionality and generation of…#1
faberc wants to merge 3 commits into
maxpeng:masterfrom
faberc:master

Conversation

@faberc
Copy link
Copy Markdown

@faberc faberc commented Apr 18, 2022

… libraries instead of executables.

Probably not the most elegant method, but this adds the functionality of passing the "-l" argument to generate the CMakeLists.txt for a library instead of an executable. Also adds support for "includeLibraries" key in cmwalk.json to include external libraries, for example:

{
"includeLibraries": ["m"]
}

generate the following in CMakeLists.txt:

# Add external explicit libraries. Such as 'm' for libm (math.h).
target_link_libraries(${PROJECT_NAME} PRIVATE m)

This includes the libm libraries (which includes the commonly used "math.h" library) which normally wouldn't be included by default.

Copy link
Copy Markdown
Owner

@maxpeng maxpeng left a comment

Choose a reason for hiding this comment

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

Hello Chuck,

Please check cmwalk/TopLevel_CMakeLists_Library.txt.jinja2, there are duplicate code. For example, there are two snippets handling LINKER_SCRIPT.

Thanks for your contribution.

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