Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set
CMAKE_CXX_STANDARD
only if newer than before (ros#38)
On Ubuntu 22.04 everything downstream of `rosconsole` [has to be build with C++17 enabled](ros/rosconsole#56). Most packages set the `CMAKE_CXX_STANDARD` before `find_package`ing, which means that the above mentioned fix will work for them. Unfortunately `urdf` does set the standard after including `rosconsole` (transitively). Instead of moving the statement before the `find_package` I decided to check explicitly if already a higher version was set, because I think it shows the intent more clearly. Also there might be other reasons why somebody decides to raise the `CMAKE_CXX_STANDARD`, which this fix will then allow.
- Loading branch information