Skip to content
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

Fix CMakeLists formatting as per reommended practices #824

Merged
merged 6 commits into from
Oct 17, 2023

Conversation

rootkea
Copy link
Contributor

@rootkea rootkea commented Oct 11, 2023

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

@rootkea rootkea marked this pull request as draft October 12, 2023 11:36
@rootkea rootkea marked this pull request as ready for review October 12, 2023 17:04
@cxong cxong merged commit 0daf4c5 into cxong:master Oct 17, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants