Skip to content

Commit

Permalink
Update rviz_rendering and rviz_rendering_tests to C++17. (#1096)
Browse files Browse the repository at this point in the history
* Update rviz_rendering and rviz_rendering_tests to C++17.

Signed-off-by: Chris Lalancette <[email protected]>

* Disable a warning on Windows.

This is because we are using an older version of Eigen
on Windows that deprecated some stuff in C++17.  For
now, just disable this warning.

Signed-off-by: Chris Lalancette <[email protected]>

---------

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Nov 22, 2023
1 parent 9050571 commit 8691d3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions rviz_rendering/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 3.5)

project(rviz_rendering)

# Default to C++14
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#elif defined(_WIN32)
#pragma warning(push)
#pragma warning(disable:4996)
#endif
#include <Eigen/Dense>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#elif defined(_WIN32)
#pragma warning(pop)
#endif

#include <OgreVector.h>
Expand Down
5 changes: 3 additions & 2 deletions rviz_rendering_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 3.5)

project(rviz_rendering_tests)

# Default to C++14
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
Expand Down

0 comments on commit 8691d3b

Please sign in to comment.