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

Missing handling for OBJCXXFLAGS ? #260

Closed
fanquake opened this issue Jul 4, 2024 · 6 comments
Closed

Missing handling for OBJCXXFLAGS ? #260

fanquake opened this issue Jul 4, 2024 · 6 comments

Comments

@fanquake
Copy link

fanquake commented Jul 4, 2024

We have code for deplicating/handling CMAKE_C_FLAGS/CMAKE_CXX_FLAGS/CMAKE_EXE_LINKER_FLAGS, but I can't see it for OBJCXXFLAGS? Is this not needed, or just missing?

Note that on master we also have OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" for silencing deprecations (in our own code), but don't see the equivalent in CMake?

@hebasto hebasto added this to the Ready for master milestone Jul 4, 2024
@hebasto
Copy link
Owner

hebasto commented Jul 11, 2024

We have code for deplicating/handling CMAKE_C_FLAGS/CMAKE_CXX_FLAGS/CMAKE_EXE_LINKER_FLAGS, but I can't see it for OBJCXXFLAGS? Is this not needed, or just missing?

The current depends/toolchain.cmake.in assumes that Objective C++ flags coincide with C++ flags:

if(NOT DEFINED CMAKE_CXX_FLAGS_INIT)
set(CMAKE_CXX_FLAGS_INIT "@CXXFLAGS@")
set(CMAKE_OBJCXX_FLAGS_INIT "@CXXFLAGS@")
endif()
if(NOT DEFINED CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "@CXXFLAGS_RELEASE@")
set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO_INIT "@CXXFLAGS_RELEASE@")
endif()
if(NOT DEFINED CMAKE_CXX_FLAGS_DEBUG_INIT)
set(CMAKE_CXX_FLAGS_DEBUG_INIT "@CXXFLAGS_DEBUG@")
set(CMAKE_OBJCXX_FLAGS_DEBUG_INIT "@CXXFLAGS_DEBUG@")
endif()

EDIT: Removed the wrong statement.

@fanquake
Copy link
Author

No silencing deprecation is required because the Qt dependency libraries are included as system ones using the -isystem flag.

Not sure what you mean. It's our code using the deprecated functions, not Qt.

@hebasto
Copy link
Owner

hebasto commented Jul 11, 2024

Note that on master we also have OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations" for silencing deprecations (in our own code), but don't see the equivalent in CMake?

set_property(SOURCE macnotificationhandler.mm
# Ignore warnings "'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0".
APPEND PROPERTY COMPILE_OPTIONS -Wno-deprecated-declarations
)

No silencing deprecation is required because the Qt dependency libraries are included as system ones using the -isystem flag.

Not sure what you mean. It's our code using the deprecated functions, not Qt.

You're right. Please ignore my wrong statement in the previous #260 (comment).

@fanquake
Copy link
Author

Also, is OBJC_OLD_DISPATCH_PROTOTYPES missing, or just missing from the configure output?

@hebasto
Copy link
Owner

hebasto commented Jul 14, 2024

Also, is OBJC_OLD_DISPATCH_PROTOTYPES missing, or just missing from the configure output?

Fixed in #265.

hebasto added a commit that referenced this issue Jul 16, 2024
cc78394 [FIXUP] cmake: Add missed `OBJC_OLD_DISPATCH_PROTOTYPES=0` (Hennadii Stepanov)

Pull request description:

  This PR addresses #260 (comment).

Top commit has no ACKs.

Tree-SHA512: 4a45f11e3dd1f35178ac8f94016130fb67e45d1b45e127bec92b1fb454cb832163fda065e291aebc55a22b67b4b1a34de3c878c5585f009e1c474af127f66079
@fanquake
Copy link
Author

I think this is fixed now.

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

No branches or pull requests

2 participants