Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 2 additions & 3 deletions pluginlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.5)
project(pluginlib)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
if(NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17)
set(CMAKE_CXX_STANDARD 17)
endif()

if(NOT WIN32)
Expand Down
10 changes: 1 addition & 9 deletions pluginlib/include/pluginlib/impl/filesystem_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


#if defined(__has_include)
# if __has_include(<filesystem>) && __cplusplus >= 201703L
# if __has_include(<filesystem>)
# include <filesystem>

namespace pluginlib
Expand All @@ -50,14 +50,6 @@ namespace fs = std::filesystem;

# define PLUGINLIB__IMPL__FILESYSYEM_HELPER__HAS_STD_FILESYSTEM
# elif __has_include(<experimental/filesystem>)
// MSVC deprecates <experimental/filesystem> and in favor of <filesystem>
// use this macro to acknowledge this deprecation and unblock the build break
# define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
// Clang 9.0 deprecates experimental/filesystem in favor of C++17's
// std::filesystem. Since pluginlib currently targets C++14 but needs to
// support recent clang releases this acknowledges and suppresses the
// deprecation error.
# define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM
# include <experimental/filesystem>

namespace pluginlib
Expand Down
4 changes: 4 additions & 0 deletions pluginlib/pluginlib-extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ ament_register_extension("ament_package" "pluginlib"

include("${pluginlib_DIR}/pluginlib_export_plugin_description_file.cmake")

if(NOT DEFINED CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 17)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
# Before LLVM 7.0, filesystem is part of experimental
Expand Down