Skip to content

CMake: Use toolchain files #2836

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
Dec 20, 2018
Merged

CMake: Use toolchain files #2836

merged 1 commit into from
Dec 20, 2018

Conversation

chfast
Copy link
Member

@chfast chfast commented Aug 28, 2017

No description provided.

chriseth
chriseth previously approved these changes Aug 28, 2017
@chfast
Copy link
Member Author

chfast commented Aug 28, 2017

Wait with this. I see a lot of failures.

@chfast chfast changed the title CMake: Use toolchain files WIP CMake: Use toolchain files Aug 28, 2017
@axic
Copy link
Member

axic commented Sep 27, 2017

@chfast are you still working on this?

@chfast
Copy link
Member Author

chfast commented Sep 27, 2017

Not actively.

I have problem with Emscripten - I'm not able to mix C++11 toolchain with Emscripten toolchain. Everytime I touch something related to Emscripten the Travis build fails without enough information in logs... I will go back to this some day, but probably not this week.

@axic axic changed the title WIP CMake: Use toolchain files [WIP] CMake: Use toolchain files Oct 3, 2017
@axic
Copy link
Member

axic commented Nov 29, 2017

@chfast was this problem resolved?

@chfast
Copy link
Member Author

chfast commented Nov 30, 2017

No. Emscripten toolchain is not fully supported by Hunter and you cannot build Boost this way.

@axic
Copy link
Member

axic commented Dec 12, 2017

@chfast what should we do with this PR in that case?

@axic
Copy link
Member

axic commented Feb 21, 2018

This should help by using the sane default from Emscripten via the toolchain file.

@chfast can this be finished somehow?

@chfast
Copy link
Member Author

chfast commented Feb 21, 2018

Yes, the idea it's simple: you have 2 toolchain files: one for regular C++11 builds, one for Emscripten builds.

But this not work in practice, because Hunter does not support building boost with Emscripten this way. It requires some work there, probably quite time consuming.

@axic
Copy link
Member

axic commented Jun 27, 2018

@chfast are you saying this PR should be abandoned or not?

If it should be abandoned, does it still make sense creating an issue and linking here so that someone in the future might pick it up?

@axic
Copy link
Member

axic commented Aug 2, 2018

@ekpyron here's another CMake PR to think about.

@axic axic removed the in progress label Aug 2, 2018
@ekpyron
Copy link
Member

ekpyron commented Aug 2, 2018

@axic Yes - I like this one. I think we should decide about #4486 first, though - it should make things easier.

@ekpyron ekpyron self-assigned this Aug 2, 2018
@axic
Copy link
Member

axic commented Nov 14, 2018

@ekpyron are you still working on this?

@ekpyron
Copy link
Member

ekpyron commented Nov 14, 2018

@axic Not right now, but looking into this and generally improving the build system is on my list.

@axic
Copy link
Member

axic commented Nov 21, 2018

Rebased.

@axic
Copy link
Member

axic commented Nov 21, 2018

@ekpyron @chfast wow this actually works after we've merged the emscripten updates.

@codecov
Copy link

codecov bot commented Nov 22, 2018

Codecov Report

Merging #2836 into develop will decrease coverage by 0.3%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2836      +/-   ##
===========================================
- Coverage    88.33%   88.03%   -0.31%     
===========================================
  Files          339      312      -27     
  Lines        32789    31371    -1418     
  Branches      3912     3752     -160     
===========================================
- Hits         28965    27616    -1349     
- Misses        2493     2500       +7     
+ Partials      1331     1255      -76
Flag Coverage Δ
#all 88.03% <ø> (-0.31%) ⬇️
#syntax 29.07% <ø> (+0.75%) ⬆️

@chriseth
Copy link
Contributor

Moving from "needs review" to "in progress" as the title says "WIP".

@axic
Copy link
Member

axic commented Dec 19, 2018

Moving from "needs review" to "in progress" as the title says "WIP".

The title wrongfully said it after. It needs to be reviewed.

@axic axic changed the title [WIP] CMake: Use toolchain files CMake: Use toolchain files Dec 19, 2018
@axic
Copy link
Member

axic commented Dec 19, 2018

Rebased this and updated to C++14, not sure if it works anymore.

@chriseth
Copy link
Contributor

What is this about? What is the benefit?

@axic
Copy link
Member

axic commented Dec 20, 2018

I think the main benefit is to properly (aka cmake style) set the compiler version. @chfast can answer better probably.

@chriseth
Copy link
Contributor

Seems to be fine.

Copy link
Contributor

@chriseth chriseth 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 we should also change the

@chriseth chriseth merged commit 8d9186b into develop Dec 20, 2018
@axic axic deleted the cmake-toolchains branch December 20, 2018 10:24
@chfast
Copy link
Member Author

chfast commented Dec 20, 2018

This is a way to extend some CMake settings to dependencies. Hunter relay on this. E.g. you can have a toolchain file that configures the build for Emscripten and "magically" whole project will cross-compile with Emscripten.
But this allows you also do something simpler without adding additional options to project, e.g. compile in C++14 mode.

There are my example toolchains: https://github.com/ethereum/cable/tree/master/toolchains
I also have a -march=native somewhere for benchmarking.

Here are more: https://github.com/ruslo/polly.

axic added a commit that referenced this pull request Jan 17, 2019
This was made obsolete by using toolchain files (#2836)
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