Skip to content
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

clang19 compatibility #1465

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
add_definitions("-Werror=return-local-addr")
elseif( COMPILER_IS_CLANG )
add_definitions("-Werror=return-stack-address")
# prevents CLANG from "error: integer value -1 is outside the valid range of values [0, 3]
# for the enumeration type 'sign_mixture_enum' [-Wenum-constexpr-conversion]"
add_definitions("-Wno-error=enum-constexpr-conversion")
endif()

set(OPENRAVE_EXPORT_CXXFLAGS)
Expand Down Expand Up @@ -243,7 +246,7 @@ if( MSVC )
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/msvc_include/stdint.h DESTINATION include/openrave-${OPENRAVE_VERSION_MAJOR}.${OPENRAVE_VERSION_MINOR} COMPONENT ${COMPONENT_PREFIX}dev)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/msvc_include)
endif()

# have to install dlls manually
if( MSVC70 OR MSVC71 )
set(MSVC_PREFIX "vc70")
Expand All @@ -255,7 +258,7 @@ if( MSVC )
set(MSVC_PREFIX "vc100")
endif()
set(OPENRAVE_LIBRARY_SUFFIX "${OPENRAVE_SOVERSION}-${MSVC_PREFIX}-mt" CACHE STRING "Suffix to append to library names")

# force multi-threaded DLL boost
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
Expand All @@ -269,6 +272,9 @@ find_package(Boost REQUIRED COMPONENTS filesystem system thread iostreams)
set(OPENRAVE_BOOST_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
set(OPENRAVE_BOOST_LIB_DIRS ${Boost_LIBRARY_DIRS})

# prevents CLANG from "error: integer value -1 is outside the valid range of values [0, 3] for the enumeration type 'sign_mixture_enum' [-Wenum-constexpr-conversion]"
include_directories(SYSTEM ${OPENRAVE_BOOST_INCLUDE_DIRS})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lazydroid do you still need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yoshikikanemoto it's not strictly required for suppressing -Wenum-constexpr-conversion errors, however, it should help to reduce warning noise coming from Boost and maybe other system includes.

If you think this should be removed, I shall remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yoshikikanemoto this part is gone.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. thanks


if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG )
set(NATIVE_COMPILE_FLAGS "" CACHE STRING "compilation flags to pass to tools that are executed at build-time. For example '-march=native -mtune=native'. By default this is empty.")
else()
Expand Down
Loading