fix: move explanation for clarity
This commit is contained in:
parent
8abc4092b7
commit
0c534d5eaf
@ -1,9 +1,9 @@
|
|||||||
# Do's and Don'ts
|
# Do's and Don'ts
|
||||||
|
|
||||||
## CMake Antipatterns
|
|
||||||
|
|
||||||
The next two lists are heavily based on the excellent gist [Effective Modern CMake]. That list is much longer and more detailed, feel free to read it as well.
|
The next two lists are heavily based on the excellent gist [Effective Modern CMake]. That list is much longer and more detailed, feel free to read it as well.
|
||||||
|
|
||||||
|
## CMake Antipatterns
|
||||||
|
|
||||||
- **Do not use global functions**: This includes `link_directories`, `include_libraries`, and similar.
|
- **Do not use global functions**: This includes `link_directories`, `include_libraries`, and similar.
|
||||||
- **Don't add unneeded PUBLIC requirements**: You should avoid forcing something on users that is not required (`-Wall`). Make these PRIVATE instead.
|
- **Don't add unneeded PUBLIC requirements**: You should avoid forcing something on users that is not required (`-Wall`). Make these PRIVATE instead.
|
||||||
- **Don't GLOB files**: Make or another tool will not know if you add files without rerunning CMake. Note that CMake 3.12 adds a `CONFIGURE_DEPENDS` flag that makes this far better if you need to use it.
|
- **Don't GLOB files**: Make or another tool will not know if you add files without rerunning CMake. Note that CMake 3.12 adds a `CONFIGURE_DEPENDS` flag that makes this far better if you need to use it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user