diff options
author | Brad King <brad.king@kitware.com> | 2020-10-05 12:56:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-05 12:56:32 (GMT) |
commit | b1898bf97570b2887f7398105231ff72adb1564d (patch) | |
tree | 3c57d20939911c9f09f9e5cbb49c11e6f101df74 /Utilities | |
parent | d25c38374c4b2aeed92c9e0dcccbb51c36add406 (diff) | |
parent | a3025e2f9bbe07a172a20d1034deb53fa6d40e00 (diff) | |
download | CMake-b1898bf97570b2887f7398105231ff72adb1564d.zip CMake-b1898bf97570b2887f7398105231ff72adb1564d.tar.gz CMake-b1898bf97570b2887f7398105231ff72adb1564d.tar.bz2 |
Merge topic 'update-regenerate-lexers'
a3025e2f9b Utilities/Scripts: Update regenerate-lexers.bash
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5316
Diffstat (limited to 'Utilities')
-rwxr-xr-x | Utilities/Scripts/regenerate-lexers.bash | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/Scripts/regenerate-lexers.bash b/Utilities/Scripts/regenerate-lexers.bash index 186802a..4bf767f 100755 --- a/Utilities/Scripts/regenerate-lexers.bash +++ b/Utilities/Scripts/regenerate-lexers.bash @@ -9,6 +9,8 @@ fi pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null +extra_args_CommandArgument="--never-interactive --batch" + for lexer in \ CommandArgument \ CTestResourceGroups \ @@ -22,8 +24,9 @@ do in_file=cm${lexer}Lexer.in.l if [[ (${in_file} -nt ${cxx_file}) || (${in_file} -nt ${h_file}) || (${forced} -gt 0) ]]; then + extra_args=`eval echo \\${extra_args_\${lexer}}` echo "Generating Lexer ${lexer}" - flex --nounistd -DFLEXINT_H --noline --header-file=${h_file} -o${cxx_file} ${in_file} + flex --nounistd ${extra_args} -DFLEXINT_H --noline --header-file=${h_file} -o${cxx_file} ${in_file} sed -i 's/\s*$//' ${h_file} ${cxx_file} # remove trailing whitespaces sed -i '${/^$/d;}' ${h_file} ${cxx_file} # remove blank line at the end sed -i '1i#include "cmStandardLexer.h"' ${cxx_file} # add cmStandardLexer.h include |