forked from qt-creator/qt-creator
CMakePM: Move cmListFileLexer.c as cmListFileLexer.cxx
This way Qt Creator will not have two code model language contexts for the CMakeProjectManager. Change-Id: Ie71b845779aff472836b164a5c65fdc7d75debb1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -2596,7 +2596,7 @@ static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We need to extend the buffer. */
|
/* We need to extend the buffer. */
|
||||||
temp = malloc(newSize);
|
temp = (char *) malloc(newSize);
|
||||||
if (lexer->token.text) {
|
if (lexer->token.text) {
|
||||||
memcpy(temp, lexer->token.text, lexer->token.length);
|
memcpy(temp, lexer->token.text, lexer->token.length);
|
||||||
free(lexer->token.text);
|
free(lexer->token.text);
|
||||||
@@ -7,7 +7,7 @@ This file must be translated to C and modified to build everywhere.
|
|||||||
|
|
||||||
Run flex >= 2.6 like this:
|
Run flex >= 2.6 like this:
|
||||||
|
|
||||||
flex --nounistd -DFLEXINT_H --noline -ocmListFileLexer.c cmListFileLexer.in.l
|
flex --nounistd -DFLEXINT_H --noline -ocmListFileLexer.cxx cmListFileLexer.in.l
|
||||||
|
|
||||||
Modify cmListFileLexer.c:
|
Modify cmListFileLexer.c:
|
||||||
- remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c
|
- remove trailing whitespace: sed -i 's/\s*$//' cmListFileLexer.c
|
||||||
@@ -309,7 +309,7 @@ static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* We need to extend the buffer. */
|
/* We need to extend the buffer. */
|
||||||
temp = malloc(newSize);
|
temp = (char *)malloc(newSize);
|
||||||
if (lexer->token.text) {
|
if (lexer->token.text) {
|
||||||
memcpy(temp, lexer->token.text, lexer->token.length);
|
memcpy(temp, lexer->token.text, lexer->token.length);
|
||||||
free(lexer->token.text);
|
free(lexer->token.text);
|
||||||
|
|||||||
@@ -44,6 +44,6 @@ add_qtc_plugin(CMakeProjectManager
|
|||||||
presetsmacros.cpp presetsmacros.h
|
presetsmacros.cpp presetsmacros.h
|
||||||
projecttreehelper.cpp projecttreehelper.h
|
projecttreehelper.cpp projecttreehelper.h
|
||||||
3rdparty/cmake/cmListFileCache.cxx
|
3rdparty/cmake/cmListFileCache.cxx
|
||||||
3rdparty/cmake/cmListFileLexer.c
|
3rdparty/cmake/cmListFileLexer.cxx
|
||||||
3rdparty/cmake/cmListFileCache.h
|
3rdparty/cmake/cmListFileCache.h
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ QtcPlugin {
|
|||||||
files: [
|
files: [
|
||||||
"cmListFileCache.cxx",
|
"cmListFileCache.cxx",
|
||||||
"cmListFileCache.h",
|
"cmListFileCache.h",
|
||||||
"cmListFileLexer.c",
|
"cmListFileLexer.cxx",
|
||||||
"cmListFileLexer.h",
|
"cmListFileLexer.h",
|
||||||
"cmStandardLexer.h",
|
"cmStandardLexer.h",
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user