* For CRAN submission, remove all #pragma's that suppress compiler warnings A few headers in dmlc-core contain #pragma's that disable compiler warnings, which is against the CRAN submission policy. Fix the problem by removing the offending #pragma's as part of the command `make Rbuild`. This addresses issue #3322. * Fix script to improve Cygwin/MSYS compatibility We need this to pass rmingw CI test * Remove remove_warning_suppression_pragma.sh from packaged tarball
15 lines
364 B
Bash
Executable File
15 lines
364 B
Bash
Executable File
#!/bin/bash
|
|
# remove all #pragma's that suppress compiler warnings
|
|
set -e
|
|
set -x
|
|
for file in xgboost/src/dmlc-core/include/dmlc/*.h
|
|
do
|
|
sed -i.bak -e 's/^.*#pragma GCC diagnostic.*$//' -e 's/^.*#pragma clang diagnostic.*$//' -e 's/^.*#pragma warning.*$//' "${file}"
|
|
done
|
|
for file in xgboost/src/dmlc-core/include/dmlc/*.h.bak
|
|
do
|
|
rm "${file}"
|
|
done
|
|
set +x
|
|
set +e
|