diff --git a/chapters/intro/dodonot.md b/chapters/intro/dodonot.md index b699d4f..f73a441 100644 --- a/chapters/intro/dodonot.md +++ b/chapters/intro/dodonot.md @@ -1,9 +1,9 @@ # 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. +## CMake Antipatterns + - **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 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.