Closed Bidski closed 3 years ago
@Bidski thanks for the report.
pagmo is a C++17 library, so the assumption is that packages depending on pagmo are also accepting that they need to be compiled in C++17 mode.
Of course it would be better if somehow we could convey this information also in the CMake machinery, but at this time it is unclear to me how to do it. I remember looking into this some (a long?) time ago and concluding that there was no clean way to do this via CMake, but perhaps I did not look hard enough. Do you have concrete pointers/suggestions on how to do it?
Note that we do not want to force people to use C++17 when depending on pagmo - we want people to have the option to use C++20 as well. So the constraint should be something like C++ >= 17
.
@Bidski can we consider this fixed by #458?
@bluescarni yes, I think this is fixed now
Describe the bug
std::conjunction
,std::disjunction
, andstd::negation
are all only available in C++17. When including pagmo from a third-party application via CMake compilation will fail unless the third-party app also sets C++17. However, pagmo-config.cmake or pagmo_export.cmake should be setting the required compiler standard so that third-party apps don't need to be concerned with this detail.To Reproduce
find_package(pagmo CONFIG)
#include <pagmo/pagmo.hpp>
Environment (please complete the following information):