Skip to content

Commit

Permalink
fixing build on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Jan 16, 2024
1 parent ba1a7f0 commit 22c1a41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/Modules/FindTIRPC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if( NOT TARGET TIRPC::TIRPC )
add_library( TIRPC::TIRPC INTERFACE IMPORTED )

set_target_properties( TIRPC::TIRPC PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "-D__TIRPC__"
INTERFACE_COMPILE_DEFINITIONS "__TIRPC__"
INTERFACE_INCLUDE_DIRECTORIES "${TIRPC_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${TIRPC_LIBRARIES}"
)
Expand Down
6 changes: 4 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ include_directories( SYSTEM ${Boost_INCLUDE_DIR} )
# Hack to build on GCC/12.2.0
if( NOT WIN32 OR MINGW )
if ( NOT APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-use-after-free -Wno-mismatched-new-delete" )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 11.0 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-use-after-free -Wno-mismatched-new-delete" )
endif()
endif()
endif()

Expand All @@ -21,7 +23,7 @@ else()
add_compile_options( -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers )
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 5.0 )
add_compile_options( -Wno-format-truncation -Wno-format-overflow )
if( NOT MINGW )
if( NOT MINGW AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 11.0 )
add_compile_options( -Wno-use-after-free )
endif()
endif()
Expand Down

0 comments on commit 22c1a41

Please sign in to comment.