-
Notifications
You must be signed in to change notification settings - Fork 865
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
[build] Fixed possibility to compile examples with C++03 standard #1830
[build] Fixed possibility to compile examples with C++03 standard #1830
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.
Minor edits.
Co-authored-by: stevomatthews <smatthews@haivision.com>
CMakeLists.txt
Outdated
#if (DEFINED USE_CXX_STD) | ||
# message(FATAL_ERROR "USE_CXX_STD can be set only when ENABLE_CXX11 is on") | ||
#endif() |
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.
Can be removed
docs/DevelopersGuide.md
Outdated
2. The examples (to be enabled by `--enable-examples`) require either C++03 or C89 standard. | ||
3. The following require C++11 standard: | ||
* demo applications | ||
* testing applications (to be enabled by `--enable-testing`) | ||
* unit tests (to be enabled by `--enable-unittests`) | ||
|
||
Note that C++11 standard will be enforced if you have enabled applications | ||
and haven't specified the C++ standard explicitly. When you have an old compiler | ||
that does not support C++11 and you want to compile as many parts as possible, | ||
the simplest way is to use the following options: | ||
|
||
``` | ||
./configure --disable-apps --use-c++-std=03 --enable-examples | ||
``` |
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.
CMake should be the default build system. TCL is not available on Windows by default.
cmake . -DENABLE_APPS=ON and so on
docs/DevelopersGuide.md
Outdated
``` | ||
./configure --disable-apps --use-c++-std=03 --enable-examples | ||
``` | ||
|
||
Note also that there are several other options that, when enabled, may require that the SRT library be compiled using C++11 standard (`--enable-stdc++-sync` for example). |
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.
Convert to cmake
Fixed:
The examples were enforced to be compiled with C++11 standard even though they are written in C++03 or even in C style.
After the fix it is possible to compile the library and examples using a compiler that is not C++11 capable using options: