-
Notifications
You must be signed in to change notification settings - Fork 55
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
Silent compiler warnings via -isystem includes #102
base: melodic-devel
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,14 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) | |
|
||
set(SIP_BUILD_DIR ${sip_BINARY_DIR}/sip/${PROJECT_NAME}) | ||
|
||
set(INCLUDE_DIRS ${${PROJECT_NAME}_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) | ||
set(INCLUDE_DIRS) | ||
foreach(dir ${${PROJECT_NAME}_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) | ||
get_filename_component(dir_real "${dir}" REALPATH BASE_DIR ${sip_SOURCE_DIR}) | ||
# filter out /usr/include, which must not be included via -isystem | ||
if (NOT "${dir_real}" STREQUAL "/usr/include") | ||
list(APPEND INCLUDE_DIRS ${dir_real}) | ||
endif() | ||
endforeach() | ||
set(LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS}) | ||
set(LDFLAGS_OTHER ${${PROJECT_NAME}_LDFLAGS_OTHER}) | ||
|
||
|
@@ -92,6 +99,7 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) | |
add_custom_command( | ||
OUTPUT ${SIP_BUILD_DIR}/Makefile | ||
COMMAND ${PYTHON_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" \"${EXTRA_DEFINES}\" | ||
COMMAND sed -i 's/ -I/ -isystem/g' ${SIP_BUILD_DIR}/Makefile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there are windows users, and it seems like requiring There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure that will be possible. But, I will not have cycles to do that in any near future. I am using the present patch since several months already and just barely managed to file the PR now. |
||
DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} | ||
WORKING_DIRECTORY ${sip_SOURCE_DIR} | ||
COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..." | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why filtering
/usr/include
is necessary, but I'm willing to try it in Noetic and see if it causes issues.