-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
|
||
#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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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. |
Sorry I forgot to merge, thanks! |
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!