Update cmake.md for 3.21

Some of the directions in the documentation here are redundant with the imported targets that CMake already provides. Generally speaking, it is preferable to use the first-party imported targets to defining your own, especially when they are as complex as these.

Also uses option() where possible instead of set(CACHE BOOL). There are many reasons why option() is preferable... see CMP0077 and CMP0126 for two.

Submitters and reviewers please make sure

  • internal links are relative and to the .md file
  • avoid links named "here"
  • alt-text for images is descriptive
  • doesn't duplicate existing content
  • spell check
  • renders correctly
  • does not include any identifiable information (real usernames, project names, etc)
Edited by Alex Reinking

Merge request reports

Loading