Skip to content

Commit 8305768

Browse files
authored
Merge pull request #831 from CEED/jeremy/minor-typo
doc - minor typo
2 parents 53ec0ce + db52d62 commit 8305768

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ install : $(libceed) $(OBJDIR)/ceed.pc
641641
$(INSTALL_DATA) include/ceed.h "$(DESTDIR)$(includedir)/"
642642
$(INSTALL_DATA) include/ceedf.h "$(DESTDIR)$(includedir)/"
643643

644-
.PHONY : all cln clean doxygen doc lib install par print test tst prove prv prove-all junit examples style style-c style-py tidy info info-backends info-backends-all
644+
.PHONY : all cln clean doxygen doc lib install par print test tst prove prv prove-all junit examples style style-c style-py tidy iwyu info info-backends info-backends-all
645645

646646
cln clean :
647647
$(RM) -r $(OBJDIR) $(LIBDIR) dist *egg* .pytest_cache *cffi*
@@ -687,6 +687,17 @@ tidy_cpp : $(libceed.cpp:%=%.tidy)
687687

688688
tidy : tidy_c tidy_cpp
689689

690+
ifneq ($(wildcard ../iwyu/*),)
691+
IWYU_DIR ?= ../iwyu
692+
endif
693+
ifneq ($(IWYU_DIR),)
694+
IWYU_CC = $(IWYU_DIR)/build/bin/include-what-you-use
695+
696+
iwyu_cc :
697+
CC = $(IWYU_CC)
698+
iwyu : lib | iwyu_cc
699+
endif
700+
690701
print :
691702
@echo $(VAR)=$($(VAR))
692703

doc/sphinx/source/libCEEDdev.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ run on a single file, use
3030

3131
for example. All issues reported by `make tidy` should be fixed.
3232

33-
## Header Files
33+
## Include-What-You-Use
3434

3535
Header inclusion for source files should follow the principal of 'include what you use' rather than relying upon transitive `#include` to define all symbols.
3636

37-
Every symbol that is used in the source file `foo.c` should be defined in `foo.c`, `foo.h`, or in a header file ``` #include``d in one of these two locations.
38-
Please check your code by running the tool ``include-what-you-use ``` to see recommendations for changes to your source.
37+
Every symbol that is used in the source file `foo.c` should be defined in `foo.c`, `foo.h`, or in a header file `#include`d in one of these two locations.
38+
Please check your code by running the tool [`include-what-you-use`](https://include-what-you-use.org/) to see recommendations for changes to your source.
3939
Most issues reported by `include-what-you-use` should be fixed; however this rule is flexible to account for differences in header file organization in external libraries.
40+
If you have `include-what-you-use` installed in a sibling directory to libCEED, then you can use the makefile target `make iwyu`.
4041

4142
Header files should be listed in alphabetical order, with installed headers preceding local headers and `ceed` headers being listed first.
43+
The `ceed-f64.h` and `ceed-f32.h` headers should only be included in `ceed.h`.
4244

4345
```c
4446
#include <ceed.h>
@@ -67,7 +69,7 @@ for (d=0; d<dim; d++)
6769
for (c=0; c<num_comp; c++)
6870
for (q=0; q<Q; q++)
6971
for (e=0; e<num_elem; e++)
70-
u[((d*num_comp + c)*Q + q)*nnum_elemlem + e] = ...
72+
u[((d*num_comp + c)*Q + q)*num_elem + e] = ...
7173
```
7274

7375
This ordering is sometimes referred to as row-major or C-style. Note

doc/sphinx/source/releasenotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ for each release of libCEED.
2424
### Maintainability
2525

2626
- Refactored preconditioner support internally to facilitate future development and improve GPU completeness/test coverage.
27+
- `Include-what-you-use` makefile target added as `make iwyu`.
2728

2829
(v0-9)=
2930

0 commit comments

Comments
 (0)