# CMake

#### References

* [CMake Documentation](https://cmake.org/cmake/help/latest/index.html) (official, latest, top-level)
* [CMake Tutorial](https://cmake.org/cmake/help/latest/guide/tutorial/index.html) (official, latest)
* [CMake Practice](https://github.com/Akagi201/learning-cmake/blob/master/docs/cmake-practice.pdf) (tutorial from users)
* [CMake 3.0.2 Documentation](https://cmake.org/cmake/help/v3.0/index.html) (top level, minimum requirement in Ubuntu 18)
  * [CMake Variables](https://cmake.org/cmake/help/v3.0/manual/cmake-variables.7.html)
  * [CMake Commands](https://cmake.org/cmake/help/v3.0/manual/cmake-commands.7.html)
  * [CMake Build System](https://cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html)
    * build target and library, set property
  * [CMake Packages](https://cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html)
    * about find\_package(), etc.
  * [CMake Modules](https://cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html)
    * [ExternalProject](https://cmake.org/cmake/help/v3.0/module/ExternalProject.html)

#### Notes

* `std::min` and `std::max`
  * `min` and `max` are defined as macros on some systems. `std::min` and `std::max` may not be used. Use `cmMinimum` and `cmMaximum` instead.
* `size_t`
  * Various implementations have differing implementation of `size_t`. When assigning the result of `.size()` on a container for example, the result should not be assigned to an `unsigned int` or similar. `std::size_t` must not be used.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.hanzheteng.com/development/cmake.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
