Skip to content

cmake: state libmruby.a and libonigmo.a are generated on building mruby - #2504

Merged
gfx merged 1 commit into
masterfrom
gfx/define-generated-files-from-mruby-builder
Dec 3, 2020
Merged

gfx merged 1 commit into
masterfrom
gfx/define-generated-files-from-mruby-builder

Conversation

@gfx

@gfx gfx commented Dec 2, 2020

Copy link
Copy Markdown
Contributor

Some cmake generators like Ninja cannot handle implicitly generated files, failing with messages like (in case of Ninja):

ninja: error: 'mruby/host/lib/libmruby.a', needed by 'h2o', missing and no known rule to make it

The solution is just to define files with BYPRODUCTS libmruby.a libonigumo.a in ADD_CUSTOM_TARGET.

With this patch, cmake -G Ninja -Bb . && cmake --build b works!

Some cmake generators like Ninja cannot handle implicit generated files,
so now `cmake -G Ninja -Bb . && cmake --build b` works!

@kazuho kazuho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@gfx
gfx merged commit 05927f8 into master Dec 3, 2020
@gfx
gfx deleted the gfx/define-generated-files-from-mruby-builder branch December 3, 2020 02:14
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