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

Support building FRUT with JUCE 7.0.3 #750

Merged
merged 4 commits into from
Dec 13, 2022
Merged

Support building FRUT with JUCE 7.0.3 #750

merged 4 commits into from
Dec 13, 2022

Conversation

McMartin
Copy link
Owner

@McMartin McMartin commented Dec 9, 2022

Resolves #749

From the documentation of CMAKE_CXX_STANDARD_REQUIRED:

  If this property is OFF or unset, the CXX_STANDARD target property is
  treated as optional and may “decay” to a previous standard if the
  requested is not available.

This means that we keep supporting building FRUT with older versions of
JUCE, that require C++11 or C++14.
In juce-framework/JUCE@2e81e8a0d, which was
released in JUCE 5.1.0, the per-exporter and per-configuration settings
related to the C++ language standard were replaced by a per-project
setting (`JUCER_CXX_LANGUAGE_STANDARD`).

This commit refactors `_FRUT_set_cxx_language_standard_properties` to
match what happened in that JUCE commit and to handle these settings
based on JUCER_VERSION instead of whether JUCER_CXX_LANGUAGE_STANDARD is
defined.
This matches what was done in
juce-framework/JUCE@b3a4d54a7, which was
released in JUCE 7.0.3.
7.0.3 is the latest version of JUCE.
@McMartin McMartin marked this pull request as ready for review December 10, 2022 02:07
@McMartin
Copy link
Owner Author

@MartyLake please review, thanks!

target_compile_options(Jucer2CMake_JUCE PRIVATE -Wno-deprecated-declarations)
target_compile_options(Jucer2CMake_JUCE PRIVATE
-Wno-deprecated-declarations
-Wno-register
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is -Wno-register with C++17 ? a new unnecessary warning generated by setting cxx17 ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

When building older versions of JUCE with C++17 we get:

error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

from third-party libraries included in JUCE (jpglib and zlib). There's nothing much we can do but disable that warning.

Copy link
Collaborator

@MartyLake MartyLake left a comment

Choose a reason for hiding this comment

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

apart from minor question, LGTM

@McMartin McMartin merged commit 102b590 into main Dec 13, 2022
@McMartin McMartin deleted the support-JUCE-7.0.3 branch December 13, 2022 19:47
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.

Error during cmake --build . --target install ("JUCE requires c++17 or later")
2 participants