cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
868 stars 115 forks source link

Fix CMakeLists formatting as per reommended practices #824

Closed rootkea closed 8 months ago

rootkea commented 8 months ago

Hello!

  1. "It is considered best practice to use lowercase CMake commands." [0]
  2. "Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style." [1]
  3. include(CTest) is the preferred way to add testing to cmake projects. It provides a new variable BUILD_TESTING (default ON) to select whether to build the tests or not.

[0] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html#commands [1] https://gitlab.kitware.com/cmake/cmake/-/commit/9db31162 [2] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Testing%20With%20CMake%20and%20CTest.html#how-does-cmake-facilitate-testing