Skip to content

Update CMakeLists.txt#51

Open
pkohout wants to merge 2 commits into
robocup-logistics:masterfrom
pkohout:linking_fix
Open

Update CMakeLists.txt#51
pkohout wants to merge 2 commits into
robocup-logistics:masterfrom
pkohout:linking_fix

Conversation

@pkohout

@pkohout pkohout commented Mar 14, 2022

Copy link
Copy Markdown
Contributor

Hi,

While testing the compilation on my other PC I found out that the CMake does not specify the C++ version to be used. If a older version of g++ is installed that leads to a lot of errors (like std::optional is non existing and so on). I specify it now to use c++17. Just wanted to let you know, I guess this might save some time for others.

specifically setting c++ version to be 17.
@morxa morxa self-requested a review March 15, 2022 08:32

@morxa morxa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR, it makes sense to set the C++ standard explicitly. However, this should be done with CXX_STANDARD (https://cmake.org/cmake/help/v3.23/prop_tgt/CXX_STANDARD.html), i.e.,

set(CMAKE_CXX_STANDARD 17)

@pkohout

pkohout commented Aug 28, 2022

Copy link
Copy Markdown
Contributor Author

ups totally forgot about this PR. Good catch, I changed it to using the CMAKE_CXX_STANDARD variable.

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.

2 participants