update include conventions and refer to the new CMake build target
This commit is contained in:
@ -93,7 +93,8 @@ Include files should be included in this order:
|
|||||||
* the header matching the implementation (`some_class.h` for file `some_class.cpp`)
|
* the header matching the implementation (`some_class.h` for file `some_class.cpp`)
|
||||||
* mpi.h (only if needed)
|
* mpi.h (only if needed)
|
||||||
* LAMMPS local headers (preferably in alphabetical order)
|
* LAMMPS local headers (preferably in alphabetical order)
|
||||||
* system and library headers (anything that is using angular brackets; C-library headers first, then C++)
|
* system and library headers (anything that is using angular brackets; preferably in alphabetical order)
|
||||||
|
* conditional include statements (i.e. anything bracketed with ifdefs)
|
||||||
|
|
||||||
### Special Cases and Exceptions
|
### Special Cases and Exceptions
|
||||||
|
|
||||||
@ -111,12 +112,10 @@ those headers.
|
|||||||
|
|
||||||
The [Include What You Use tool](https://include-what-you-use.org/)
|
The [Include What You Use tool](https://include-what-you-use.org/)
|
||||||
can be used to provide supporting information about compliance with
|
can be used to provide supporting information about compliance with
|
||||||
the rules listed here. There are some limitations and the IWYU tool
|
the rules listed here. Through setting `-DENABLE_IWYU=on` when running
|
||||||
may give incorrect advice. The tools is activated by setting the
|
CMake, a custom build target is added that will enable recording
|
||||||
CMake variable `CMAKE_CXX_INCLUDE_WHAT_YOU_USE` variable to the
|
the compilation commands and then run the `iwyu_tool` using the
|
||||||
path of the `include-what-you-use` command. When activated, the
|
recorded compilation commands information when typing `make iwyu`.
|
||||||
tool will be run after each compilation and provide suggestions for
|
|
||||||
which include files should be added or removed.
|
|
||||||
|
|
||||||
## Legacy Code
|
## Legacy Code
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user