ata4 / angrylion-rdp-plus

A low-level N64 video emulation plugin, based on the pixel-perfect angrylion RDP plugin with some improvements.
155 stars 25 forks source link

Fix cmake compatibility warning #153

Closed Rosalie241 closed 1 year ago

Rosalie241 commented 1 year ago

This PR fixes the following:

Make Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

and it fixes the following compilation error by including stdexcept to parallel.cpp:

[ 45%] Building CXX object CMakeFiles/alp-core.dir/src/core/parallel.cpp.o
/home/rosalie/dev/angrylion-rdp-plus/angrylion-rdp-plus/src/core/parallel.cpp: In member function ‘void Parallel::run(std::function<void(unsigned int)>&&)’:
/home/rosalie/dev/angrylion-rdp-plus/angrylion-rdp-plus/src/core/parallel.cpp:73:24: error: ‘runtime_error’ is not a member of ‘std’
   73 |             throw std::runtime_error("Workers are exiting and no longer accept work");
      |                        ^~~~~~~~~~~~~
/home/rosalie/dev/angrylion-rdp-plus/angrylion-rdp-plus/src/core/parallel.cpp:11:1: note: ‘std::runtime_error’ is defined in header ‘<stdexcept>’; did you forget to ‘#include <stdexcept>’?
   10 | #include <vector>
  +++ |+#include <stdexcept>
   11 | 
make[2]: *** [CMakeFiles/alp-core.dir/build.make:94: CMakeFiles/alp-core.dir/src/core/parallel.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
GhostlyDark commented 1 year ago

3.9 should be the minimum, as the checks for cmake_policy(SET CMP0069 NEW) have been removed. There is no need to go all the way up to 3.22.

Rosalie241 commented 1 year ago

3.9 should be the minimum, as the checks for cmake_policy(SET CMP0069 NEW) have been removed. There is no need to go all the way up to 3.22.

Thank you, pushed it

ata4 commented 1 year ago

Looks good, thank you for the improvements!