-
Notifications
You must be signed in to change notification settings - Fork 357
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
Make the C++ standard configurable #2319
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me in principle, but could the flag's name be changed to with-cpp-std
? I think that would be more expressive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, just one little suggestion for documentation.
And please also add documentation for the option in the "Generic build configuration" section of https://github.com/nest/nest-simulator/blob/master/doc/userdoc/installation/cmake_options.rst
Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
@@ -120,6 +120,8 @@ Generic build configuration | |||
| ``-Dwith-intel-compiler-flags=[OFF|<list;of;flags>]``| User defined flags for the Intel compiler | | |||
| | [default='-fp-model strict']. Separate multiple flags by ';'. | | |||
+------------------------------------------------------+------------------------------------------------------------------+ | |||
| ``-Dwith-cpp-std=[OFF|<C++ standard>]`` | C++ standard to use for compilation [default='c++11']. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does -Dwith-cpp-std=OFF
actually work and result in the default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, OFF
would just mean the default value. But because it's a bit confusing I have corrected the CMake variable now.
The C++ standard can now be specified in CMake configuration with
-Dwith-std=<C++ standard>
. Default isC++11
. Fixes #2259.