I think it is better to have all code belonging to a single class be
included in one code file. If the code file gets too large, then the
probably the class itself has too many responsibilities.
Although it is possible to separate a class implementation to different
files, I would consider this class too large instead. It is somewhat
confusing having to look for implementations from different files. I
would try to make the class smaller instead by dividing it on class
level.
The 2.0.0 release of uvgRTP fails to build on CentOS7, because :
- the gcc-c++ compiler doesn't support the c++17 standard, which is
required to compile the crypto.hh file
- the getrandom() function isn't available in the libc
This pull request adds CentOS7 build support.
The modified files are :
- CMakeLists.txt : the availability of the getrandom() function is checked.
If it exists, the HAVE_GETRANDOM preprocessor definition is added
- src/random.cc : if HAVE_GETRANDOM isn't defined, a syscall equivalent to
the getrandom() functions is called
- include/crypto.hh : the c++17 code is replaced by a code that compiles with
the CentOS7 compiler (c++11)
The solution in 1f26987bf0 does not work, since
the add_compile_options must be set before defining library. Reverted to
previous solution with improvements. Now also the standard is set at the
beginning of the file just to make sure it takes effect in time.
I'm still learning to use CMake.
This way, if we want to support lower c++ version, setting the standard should
automatically set the highest standard supported.
Also update the way compiler options are set.
Add new H26x files to QtCreator and CMake build files and remove
Visual Studio project files as they are too painful to maintain
manually and they can be generated very easily using CMake
Add all new source and header files to Visual Studio, CMake and
QtCreator project files.
Rename rtcp/runner.cc and zrtp/receiver.cc files because they
caused linking problems with QtCreator