Skip to content

Commit

Permalink
Silence psabi warnings when compiling C++ generated code (#7603)
Browse files Browse the repository at this point in the history
* Silence `psabi` warnings when compiling C++ generated code

Some versions of GCC/Clang emit many of these warnings when compiling in some Intel configurations, and they are useless in this context. Make them go away.

* Update cmake/HalideGeneratorHelpers.cmake

Co-authored-by: Alex Reinking <alex.reinking@gmail.com>

---------

Co-authored-by: Alex Reinking <alex.reinking@gmail.com>
  • Loading branch information
steven-johnson and alexreinking authored Jun 5, 2023
1 parent 9ee2d0c commit 7e57438
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/HalideGeneratorHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,11 @@ function(add_halide_library TARGET)
set_target_properties("${TARGET}" PROPERTIES
POSITION_INDEPENDENT_CODE ON
LINKER_LANGUAGE CXX)
if (NOT Halide_NO_DEFAULT_FLAGS)
# Silence many useless warnings in generated C++ code compilation
target_compile_options("${TARGET}" PRIVATE
$<$<CXX_COMPILER_ID:GNU,Clang,AppleClang>:-Wno-psabi>)
endif ()
_Halide_fix_xcode("${TARGET}")
endif ()

Expand Down

0 comments on commit 7e57438

Please sign in to comment.