- /*
- * Generate the command required to open a pipe to a process
- * which will be refered to with a handle in the task for
- * reading the data from the pipe.
- */
- if (strcmp(tmpl->proceduretype, "-pp")) {
- if (qcflags) {
- if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
- util_snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
- task_bins[TASK_COMPILE],
- curdir,
- tmpl->sourcefile,
- qcflags,
- tmpl->compileflags,
- tmpl->tempfilename
- );
+ /*
+ * Additional QCFLAGS enviroment variable may be used
+ * to test compile flags for all tests. This needs to be
+ * BEFORE other flags (so that the .tmpl can override them)
+ */
+ qcflags = platform_getenv("QCFLAGS");
+
+ /*
+ * Generate the command required to open a pipe to a process
+ * which will be refered to with a handle in the task for
+ * reading the data from the pipe.
+ */
+ if (strcmp(tmpl->proceduretype, "-pp")) {
+ if (qcflags) {
+ if (tmpl->testflags && !strcmp(tmpl->testflags, "-no-defs")) {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ directories[i],
+ tmpl->sourcefile,
+ qcflags,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ } else {
+ util_snprintf(buf, sizeof(buf), "%s %s/%s %s/%s %s %s -o %s",
+ task_bins[TASK_COMPILE],
+ curdir,
+ defs,
+ directories[i],
+ tmpl->sourcefile,
+ qcflags,
+ tmpl->compileflags,
+ tmpl->tempfilename
+ );
+ }