Scilab: support of multiple -addcflag
This commit is contained in:
parent
6ab1ad9daa
commit
13db0e874a
1 changed files with 6 additions and 4 deletions
|
|
@ -42,7 +42,7 @@ protected:
|
||||||
int builderFunctionCount;
|
int builderFunctionCount;
|
||||||
|
|
||||||
List *sourceFileList;
|
List *sourceFileList;
|
||||||
String *cflag;
|
List *cflags;
|
||||||
String *ldflag;
|
String *ldflag;
|
||||||
|
|
||||||
String *verboseBuildLevel;
|
String *verboseBuildLevel;
|
||||||
|
|
@ -59,8 +59,8 @@ public:
|
||||||
virtual void main(int argc, char *argv[]) {
|
virtual void main(int argc, char *argv[]) {
|
||||||
|
|
||||||
sourceFileList = NewList();
|
sourceFileList = NewList();
|
||||||
|
cflags = NewList();
|
||||||
ldflag = NULL;
|
ldflag = NULL;
|
||||||
cflag = NULL;
|
|
||||||
verboseBuildLevel = NULL;
|
verboseBuildLevel = NULL;
|
||||||
buildFlagsScript = NULL;
|
buildFlagsScript = NULL;
|
||||||
generateBuilder = true;
|
generateBuilder = true;
|
||||||
|
|
@ -84,7 +84,7 @@ public:
|
||||||
} else if (strcmp(argv[argIndex], "-addcflag") == 0) {
|
} else if (strcmp(argv[argIndex], "-addcflag") == 0) {
|
||||||
Swig_mark_arg(argIndex);
|
Swig_mark_arg(argIndex);
|
||||||
if (argv[argIndex + 1] != NULL) {
|
if (argv[argIndex + 1] != NULL) {
|
||||||
cflag = NewString(argv[argIndex + 1]);
|
DohInsertitem(cflags, Len(cflags), argv[argIndex + 1]);
|
||||||
Swig_mark_arg(argIndex + 1);
|
Swig_mark_arg(argIndex + 1);
|
||||||
}
|
}
|
||||||
} else if (strcmp(argv[argIndex], "-addldflag") == 0) {
|
} else if (strcmp(argv[argIndex], "-addldflag") == 0) {
|
||||||
|
|
@ -220,6 +220,7 @@ public:
|
||||||
Delete(beginSection);
|
Delete(beginSection);
|
||||||
|
|
||||||
Delete(sourceFileList);
|
Delete(sourceFileList);
|
||||||
|
Delete(cflags);
|
||||||
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
|
|
@ -705,7 +706,8 @@ public:
|
||||||
|
|
||||||
// Flags from command line arguments
|
// Flags from command line arguments
|
||||||
Printf(builderCode, "cflags = \"-I\" + builddir;\n");
|
Printf(builderCode, "cflags = \"-I\" + builddir;\n");
|
||||||
if (cflag != NULL) {
|
for (int i = 0; i < Len(cflags); i++) {
|
||||||
|
String *cflag = Getitem(cflags, i);
|
||||||
Printf(builderCode, "cflags = cflags + \" %s\";\n", cflag);
|
Printf(builderCode, "cflags = cflags + \" %s\";\n", cflag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue