Skip to content
Snippets Groups Projects
Commit 0e09032c authored by Enric Tejedor Saavedra's avatar Enric Tejedor Saavedra Committed by Axel Naumann
Browse files

[Exp PyROOT] Disable strict-aliasing warnings

The warnings are triggered by the use of the Py_RETURN_TRUE and
Py_RETURN_FALSE macros of the Python C API. The use of such macros
is necessary and cannot be worked around.

The option is disabled on Windows since it does not exist.
parent c0617f3a
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,11 @@ endforeach()
ROOT_LINKER_LIBRARY(ROOTPython ${sources} LIBRARIES Core Tree cppyy)
ROOT_INSTALL_HEADERS(inc)
# Disables warnings caused by Py_RETURN_TRUE/Py_RETURN_FALSE
if(NOT MSVC)
target_compile_options(ROOTPython PRIVATE -Wno-strict-aliasing)
endif()
# Disables warnings originating from deprecated register keyword in Python
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_STANDARD GREATER_EQUAL 11)
target_compile_options(ROOTPython PRIVATE -Wno-register)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment