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

GEODE-7235: Add backwards compatibility for Clang #533

Merged

Conversation

igodwin
Copy link
Contributor

@igodwin igodwin commented Oct 2, 2019

  • One of the new flags added for Clang 11 support, -Wno-defaulted-function-deleted, was not available to earlier versions of Clang

Co-authored-by: Michael Oleske moleske@pivotal.io

igodwin and others added 2 commits October 2, 2019 11:16
Co-authored-by: Michael Oleske <moleske@pivotal.io>
- One of the new flags added for Clang 11 support was not available to earlier versions

Co-authred-by: Michael Oleske <moleske@pivotal.io>
CMakeLists.txt Outdated
@@ -191,8 +191,12 @@ if (NOT HAVE_STDC_FORMAT_MACROS)
target_compile_definitions(c++11 INTERFACE __STDC_FORMAT_MACROS)
endif()

if ("Darwin" STREQUAL ${CMAKE_SYSTEM_NAME} )
set(DISABLED_MAC_WARNINGS -Wno-defaulted-function-deleted -Wno-c++2a-compat)
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
Copy link
Contributor

Choose a reason for hiding this comment

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

Below, we set ignored compiler warnings based on the following test:

if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")

if that check works, we should be able to use the same one here, and change the variable name to something like CONDITIONALLY_DISABLED_CLANG_WARNINGS, a lot more generic than "AppleClang" and MAC.

Copy link
Contributor

Choose a reason for hiding this comment

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

Come to think of it, we could/should check and disable these warnings separately, for correctness' sake.

- moved to if statement already checking complier is clang

Co-authored-by: Michael Oleske <moleske@pivotal.io>
Co-authored-by: Ivan Godwin <igodwin@pivotal.io>
@igodwin igodwin merged commit 80ffee7 into apache:develop Oct 4, 2019
@igodwin igodwin deleted the GEODE-7235-disable-new-clang-warnings branch October 4, 2019 17:49
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.

3 participants