|
27 | 27 | echo >&2 "Project to build: $1" |
28 | 28 | path="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")" |
29 | 29 | include_path="" |
30 | | -DIR=`dirname "$0"` |
31 | 30 | file_name=$(basename "$1") |
32 | 31 |
|
33 | 32 | for foldername in $(find ${path} -type d -name "*" | LC_ALL=posix sort ); do |
|
88 | 87 | exit 9 |
89 | 88 | fi |
90 | 89 | fi |
| 90 | + |
| 91 | +# Can we build the support tool? |
| 92 | +# Problem: GNAT 2016 helpfully installs a g++ binary alongside gnat... except |
| 93 | +# it's way out of date so invoking g++ via PATH looking will pickup that gnat g++ |
| 94 | +# compiler, rather than the default system compiler... Instead we need to |
| 95 | +# temporarily drop the GNAT tools off the path while we build the tool. |
| 96 | +saved_path="$PATH" |
| 97 | +export PATH=$(echo ${PATH} | tr ':' '\n' | grep -v "${ADA_HOME}" | paste -s -d : - ) |
| 98 | +experiment_dir=`dirname "$0"` |
| 99 | +gplusplus=`command -v g++` |
| 100 | +if ! ${gplusplus} --std=c++14 "${experiment_dir}/collect_unsupported.cpp" -o CollectUnsupported ; then |
| 101 | + echo >&2 "Failed to compile support tool 'CollectUnsupported' using ${gplusplus}" |
| 102 | + echo >&2 "You need a version of g++ on the PATH that supports C++14" |
| 103 | + exit 8 |
91 | 104 | fi |
| 105 | +export PATH="${saved_path}" |
92 | 106 |
|
93 | 107 | # Enumerate all the sub directories of ADA_INCLUDE_PATH |
94 | 108 | for include_folder in `echo "$ADA_INCLUDE_PATH" | tr ':' ' '` ; do |
@@ -153,7 +167,6 @@ sed '/^\[/ d' < "$file_name".txt | \ |
153 | 167 | > "$file_name"_redacted.txt |
154 | 168 |
|
155 | 169 | # Collate and summarise unsupported features |
156 | | -g++ --std=c++14 "$DIR"/collect_unsupported.cpp -o CollectUnsupported |
157 | 170 | LC_ALL=posix ./CollectUnsupported "$file_name".txt |
158 | 171 |
|
159 | 172 | # Collate and summarize compile errors from builds that did not generate |
|
0 commit comments