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

Cmake force c++ 17 #378

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

JordanHendersonMusic
Copy link

@JordanHendersonMusic JordanHendersonMusic commented Jun 15, 2024

SuperCollider uses c++17 in its code base, not 11 (or earlier), this change forces C++17 compliance.

https://scsynth.org/t/sc3plugins-keeps-failing-to-compile/9664

@JordanHendersonMusic
Copy link
Author

@capital-G Do you recon I should merge this myself? The only way I could see this breaking was if someone was using an old compiler that didn't support C++17, but that is a requirement of supercollider so seems very unlikely.

@capital-G
Copy link

@capital-G Do you recon I should merge this myself? The only way I could see this breaking was if someone was using an old compiler that didn't support C++17, but that is a requirement of supercollider so seems very unlikely.

I think C++17 gives some interesting new features - as there are official statements that SC target C++17 but it was never enforced I think it is fair to do so now, because otherwise we can't use those features.

@telephon
Copy link
Member

What if someone wanted to compile sc3-plugins for an older version of supercollider?

@JordanHendersonMusic
Copy link
Author

Didn't think of that...

I'll add a flag that defaults to 17.

@capital-G
Copy link

What if someone wanted to compile sc3-plugins for an older version of supercollider?

They could use an older commit for compiling in this case since SC does officially target C++17 since over 3 years, see supercollider/supercollider@08ecfad

I think it is currently hard enough to keep the the most recent platforms running (see the broken macOS pipeline and boost upgrade), maintaining older compilers just creates more overhead in the long run for which we don't have enough people to maintain.
Additionally, the versioning of sc3-plugins matches the one from supercollider most likely not by incident?

I'll add a flag that defaults to 17.

I'd vote to actually enforce it and push through with it as it may signal that SC are still not fully committed to C++17, which is already a state of 3+ years.

@JordanHendersonMusic
Copy link
Author

Additionally, the versioning of sc3-plugins matches the one from supercollider most likely not by incident?

Didn't know that, it's quite a compelling, simple argument --- use the same version across SC and SCplugins.

@telephon
Copy link
Member

What if someone wanted to compile sc3-plugins for an older version of supercollider?

They could use an older commit for compiling in this case since SC does officially target C++17 since over 3 years, see supercollider/supercollider@08ecfad

Ok, this makes sense to me. Could you please add this information to the README?

Supercollider uses c++17, not 11.
@JordanHendersonMusic
Copy link
Author

Updated readme

@dyfer
Copy link
Member

dyfer commented Jun 27, 2024

Are we fully in c++17 in SC yet? supercollider/supercollider#6246 (I've only skimmed through the issue, sorry if I'm missing something obvious)

@JordanHendersonMusic
Copy link
Author

@dyfer boost isn't listed in the external libraries folder so that issue should be independent of this.

@dyfer
Copy link
Member

dyfer commented Jul 2, 2024

Ah got it, thanks.

@telephon telephon merged commit ca06c19 into supercollider:main Jul 2, 2024
5 checks passed
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.

None yet

4 participants