We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d75910d commit 836210bCopy full SHA for 836210b
Utilities/Maintenance/remove-circular-header-includes.sh
@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+# This script finds cases where .hxx files include same named
3
+# .h file, which results in recursive inclusion of the .h.
4
+
5
+SRC_DIR=$1
6
+if [ ! -d "${SRC_DIR}" ]; then
7
+ echo "ERROR: Directory not found ${SRC_DIR}"
8
+fi
9
10
11
+for hdr_imp in $(find "${SRC_DIR}" -name "*.hxx" |grep -F -v ThirdParty ); do
12
+ hdr_imp_base=$(basename "${hdr_imp}")
13
+ hdr_base=${hdr_imp_base//.hxx/.h}
14
+ sed -i "/ *#include.*${hdr_base}./d" "${hdr_imp}"
15
+done
0 commit comments