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

Fix compilation when using Ubuntu 18.04 #134

Merged
merged 3 commits into from
May 18, 2021

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented May 17, 2021

Fix robotology/robotology-superbuild#731 .

As discussed in robotology/robotology-superbuild#481, we plan to support the compilation of this library on Ubuntu 18.04 at least in the next future. For this reason, this PR fixes the library to compile correctly when on Ubuntu 18.04, that was broken after #132 .

Please squash when merging the PR, thanks!

@traversaro traversaro requested review from Nicogene and AlexAntn May 17, 2021 09:42
Comment on lines 29 to 40

#ifndef __has_include
static_assert(false, "__has_include not supported");
#else
# if __has_include(<filesystem>)
# include <filesystem>
namespace yarp_telemetry_fs = std::filesystem;
# elif __has_include(<experimental/filesystem>)
# include <experimental/filesystem>
namespace yarp_telemetry_fs = std::experimental::filesystem;
# endif
#endif
Copy link
Member

Choose a reason for hiding this comment

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

I have a weak point for checking this using CheckIncludeFileCXX instead of __has_include, since you could catch an unsupported system at configure time... Anyway probably not worth wasting time on this, since I'm not sure if we support any compiler which doesn't have __has_include or filesystem/experimental/filesystem. It might be worth adding an error if neither of them is available, though.

Copy link
Member Author

@traversaro traversaro May 17, 2021

Choose a reason for hiding this comment

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

Added error message in 17658b9 . As you said, it is probably not useful to use CheckIncludeFileCXX, and I must add that any kind of those checks are quite slow on Windows.

@traversaro
Copy link
Member Author

The macOS/Homebrew jobs are taking more then one hour just to install the dependencies. As macOS/Conda is working fine, what do you think about merging as compilation on macOS is working fine? @Nicogene

@traversaro
Copy link
Member Author

The macOS/Homebrew jobs are taking more then one hour just to install the dependencies. As macOS/Conda is working fine, what do you think about merging as compilation on macOS is working fine? @Nicogene

In the end, the build was successful also with macOS/Homebrew jobs.

@Nicogene Nicogene merged commit 49b2304 into robotology:master May 18, 2021
@Nicogene
Copy link
Member

Sorry I forgot to merge, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ubuntu 18.04 CI Jobs are failing due to a YARP_Telemetry problem
3 participants