-
Notifications
You must be signed in to change notification settings - Fork 164
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
Guard boost::filesystem usage #743
Conversation
CMake was unopinionated about what filesystem is used and required excessive flag setting. Now it clarifies that boost::filesystem is default and std::filesystem is used in case BOOST_GIL_USE_BOOST_FILESYSTEM is off and CMAKE_CXX_STANDARD>=17.
I think this is what we need, thank you! |
Line 30 in 201f31c
|
Thanks @Osyotr for reporting that. I have not tested, but I think that line should read - if I still can remember CMake expressions $<$<BOOL:${BOOST_GIL_USE_BOOST_FILESYSTEM}>:Boost::filesystem> Additionally, this piece Lines 114 to 126 in e5f5bce
could be simplified to target_compile_definitions(gil_compile_options
INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:_CRT_NONSTDC_NO_DEPRECATE>
$<$<CXX_COMPILER_ID:MSVC>:_SCL_SECURE_NO_DEPRECATE>
$<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
$<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>
$<$<CXX_COMPILER_ID:MSVC>:BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE>
$<$<BOOL:${BOOST_GIL_USE_BOOST_FILESYSTEM}>:BOOST_GIL_IO_USE_STD_FILESYSTEM>) Am I correct? |
Honestly I'd prefer not to force a specific filesystem library implementation at build time because once cmake config is installed, it's impossible to switch to another implementation. |
@Osyotr I now see better what you mean. Although I don't mind reverting it, especially if it smoothens the vcpg integration, but I do need to point out at a couple of things related to our CMake configuration
|
Actually I think there's no problem. These options are meaningless in vcpkg because we take the "if" path: Lines 10 to 41 in 8994c2f
I was confused by the lack of indentation inside if-else block and thought that these target_link_libraries calls are sequential.
|
@Osyotr No problem, thanks for your feedback. I'm happy to make package maintainers life easier. So, please feel free to report issues/suggest improvements. Thanks! |
Description
CMake was unopinionated about what filesystem is used and required excessive flag setting. Now it clarifies that boost::filesystem is default and std::filesystem is used in case
BOOST_GIL_USE_BOOST_FILESYSTEM is off and CMAKE_CXX_STANDARD>=17.
Apparently we did not explicitly linked to boost libraries anyway. Either that, or I overlooked it.
References
#742
Tasklist