Closed TeraDanielR closed 9 months ago
Thanks for the PR @TeraDanielR! I've pushed your changes to this branch: https://github.com/CesiumGS/cesium-unreal/tree/fix-build-warnings
That way our CI system can check for problems on other UE version and platforms. If all looks good, I'll merge this.
Looks like there might be some problems on some platforms/versions. Perhaps just a missing #include
. Mind taking a look?
https://github.com/CesiumGS/cesium-unreal/actions/runs/7282601826
@TeraDanielR It looks like CI is complaining about the use of #if
instead of #ifdef
. Do you mind changing these for the lines you added?
I will do that now! Thanks for the info!
On Mon, Jan 8, 2024 at 9:11 AM Janine Liu @.***> wrote:
@TeraDanielR https://github.com/TeraDanielR It looks like CI is complaining about the use of #if instead of #ifdef. Do you mind changing these for the lines you added?
— Reply to this email directly, view it on GitHub https://github.com/CesiumGS/cesium-unreal/pull/1321#issuecomment-1881198034, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBUDZJDBKXERO762JKNE7ILYNQEB3AVCNFSM6AAAAABAVFHGTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRGE4TQMBTGQ . You are receiving this because you were mentioned.Message ID: @.***>
Sorry I don't think switching to ifdef
is the right solution here (despite the error message suggesting that it is). You should be able to fix it by adding #include "CesiumCommon.h"
to the source files that use these ENGINE_VERSION
macros, because that's the header where they're defined. Once that's included, ENGINE_VERSION_5_3_OR_HIGHER
are defined in all versions of UE, but they're defined to either true or false depending on the UE version. Using ifdef
doesn't work, because #ifdef ENGINE_VERSION_5_3_OR_HIGHER
will be considered true even on UE 5.2 where the value is false (because it's still defined!) when the header is included. And meanwhile #ifdef ENGINE_VERSION_5_3_OR_HIGHER
will evaluate to false even on UE 5.3 when the header is not included (because it's not defined). Not sure if all that makes sense, but the short version is: switch back to #if
and include the CesiumCommon.h
header in any .cpp files that use these version macros.
Thanks for the info Kevin! I have pushed the changes you suggested.
On Mon, Jan 8, 2024 at 9:24 PM Kevin Ring @.***> wrote:
Sorry I don't think switching to ifdef is the right solution here (despite the error message suggesting that it is). You should be able to fix it by adding #include "CesiumCommon.h" to the source files that use these ENGINE_VERSION macros, because that's the header where they're defined. Once that's included, ENGINE_VERSION_5_3_OR_HIGHER are defined in all versions of UE, but they're defined to either true or false depending on the UE version. Using ifdef doesn't work, because #ifdef ENGINE_VERSION_5_3_OR_HIGHER will be considered true even on UE 5.2 where the value is false (because it's still defined!) when the header is included. And meanwhile #ifdef ENGINE_VERSION_5_3_OR_HIGHER will evaluate to false even on UE 5.3 when the header is not included (because it's not defined). Not sure if all that makes sense, but the short version is: switch back to #if and include the CesiumCommon.h header in any .cpp files that use these version macros.
— Reply to this email directly, view it on GitHub https://github.com/CesiumGS/cesium-unreal/pull/1321#issuecomment-1882325090, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBUDZJHRBYVIOKARQFORJD3YNSZ6BAVCNFSM6AAAAABAVFHGTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSGMZDKMBZGA . You are receiving this because you were mentioned.Message ID: @.***>
@TeraDanielR Everything looks good here to me. Can you just push an edit to CHANGES.md adding a bullet point under Fixes for your change? Something like "Fixed deprecation warning messages when packaging in Unreal 5.3." Once that's in I can get this merged!
I'm going to merge this and add a note to CHANGES.md afterwards. Thanks @TeraDanielR !
Fixes #1314 Fixes several UE5.3 build warnings when packaging.