From 6d164f14906224f82fb46602e6739303b4c5f890 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 3 Sep 2020 15:05:35 -0700 Subject: [PATCH 1/2] Fix Windows build: filesystem Signed-off-by: Louise Poubel --- gazebo/common/CMakeLists.txt | 3 --- gazebo/common/CommonIface.cc | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gazebo/common/CMakeLists.txt b/gazebo/common/CMakeLists.txt index b9b3eca0e2..161059ab82 100644 --- a/gazebo/common/CMakeLists.txt +++ b/gazebo/common/CMakeLists.txt @@ -264,9 +264,6 @@ endif() if (UNIX AND NOT APPLE) # rt is used for clock_gettime, which is not available on apple or windows target_link_libraries(gazebo_common PRIVATE rt) -endif() - -if (NOT APPLE) target_link_libraries(gazebo_common PRIVATE stdc++fs) endif() diff --git a/gazebo/common/CommonIface.cc b/gazebo/common/CommonIface.cc index 295e8f04bc..3b1fcef346 100644 --- a/gazebo/common/CommonIface.cc +++ b/gazebo/common/CommonIface.cc @@ -32,8 +32,13 @@ #endif #ifndef __APPLE__ -#include + #if __GNUC__ < 8 + #include + #else + #include + #endif #endif + #include #include From 30bf1119caa91eaae3d2df115de0c00020f31847 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 4 Sep 2020 13:34:00 -0700 Subject: [PATCH 2/2] just use boost Signed-off-by: Louise Poubel --- gazebo/common/CMakeLists.txt | 1 - gazebo/common/CommonIface.cc | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gazebo/common/CMakeLists.txt b/gazebo/common/CMakeLists.txt index 161059ab82..6e32435d61 100644 --- a/gazebo/common/CMakeLists.txt +++ b/gazebo/common/CMakeLists.txt @@ -264,7 +264,6 @@ endif() if (UNIX AND NOT APPLE) # rt is used for clock_gettime, which is not available on apple or windows target_link_libraries(gazebo_common PRIVATE rt) - target_link_libraries(gazebo_common PRIVATE stdc++fs) endif() if (HAVE_GTS) diff --git a/gazebo/common/CommonIface.cc b/gazebo/common/CommonIface.cc index 3b1fcef346..d784ef81d4 100644 --- a/gazebo/common/CommonIface.cc +++ b/gazebo/common/CommonIface.cc @@ -31,14 +31,6 @@ #include #endif -#ifndef __APPLE__ - #if __GNUC__ < 8 - #include - #else - #include - #endif -#endif - #include #include @@ -470,7 +462,7 @@ std::string common::asFullPath(const std::string &_uri, #else // Not a relative path, return unmodified if (_uri.find("://") != std::string::npos || - !std::filesystem::path(_uri).is_relative()) + !boost::filesystem::path(_uri).is_relative()) { return _uri; }