Skip to content

Commit

Permalink
Ignore unknown pragma warnings when building without OpenMP (#1324)
Browse files Browse the repository at this point in the history
Oddly, these also show up when ENABLE_STATIC_LIBS=OFF and USE_OpenMP=ON.
  • Loading branch information
hainest committed Nov 15, 2022
1 parent eba4854 commit 5d24b50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ endif()
if(DYNINST_WARNINGS_AS_ERRORS)
list(APPEND REQUESTED_WARNING_FLAGS "Werror")
message(STATUS "DYNINST_WARNINGS_AS_ERRORS set: treating warnings as errors")

# If not building with OpenMP or if static libs are enabled, ignore OpenMP pragma warnings
if(NOT USE_OpenMP OR ENABLE_STATIC_LIBS)
list(APPEND REQUESTED_WARNING_FLAGS "Wno-unknown-pragmas")
endif()
endif()

if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang)$")
Expand Down

0 comments on commit 5d24b50

Please sign in to comment.