Skip to content
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

Update CMakeLists.txt #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkohout
Copy link
Contributor

@pkohout pkohout commented Mar 14, 2022

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
Copy link
Member

@morxa morxa left a comment

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
Copy link
Contributor Author

pkohout commented Aug 28, 2022

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