Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 2 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@ find_package(ament_cmake REQUIRED)
find_package(ament_cmake_ros_core REQUIRED)
find_package(rcutils REQUIRED)

# Default to C11
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 11)
endif()
# TODO (ahcorde): Remove tl_expected when CXX 20 standard is available
# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()

# TODO (ahcorde): Remove tl_expected when CXX 23 standard is available
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# enables building a static library but later link it into a dynamic library
add_compile_options(-fPIC)
Expand All @@ -39,7 +30,7 @@ if(WIN32)
target_compile_definitions(${PROJECT_NAME}
PRIVATE "RCPPUTILS_BUILDING_LIBRARY")
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC rcutils::rcutils)
target_link_libraries(${PROJECT_NAME} PUBLIC rcutils::rcutils ament_cmake_ros_core::ament_ros_defaults)

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
Expand Down
6 changes: 6 additions & 0 deletions include/rcpputils/endian.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
#ifndef RCPPUTILS__ENDIAN_HPP_
#define RCPPUTILS__ENDIAN_HPP_

#if defined(_MSC_VER)
#pragma message("WARNING: rcpputils/endian.hpp is deprecated. Use std::endian from <bit> header instead.")
#else
#warning WARNING: rcpputils/endian.hpp is deprecated. Use std::endian from <bit> header instead.
#endif

// TODO(anyone) replace this macro when the appropriate C++20 value lands.
#if !defined(RCPPUTILS_NO_STD_ENDIAN) && (__cplusplus <= 201703L)
#define RCPPUTILS_NO_STD_ENDIAN
Expand Down