1
1

Fix issue Dan found -- we don't expand out the extra pre-processor, compiler

or linker flags.  Which makes the whole wrapper-extra-*flags thing slightly
less useful than perhaps it should be.

This commit was SVN r15222.
Этот коммит содержится в:
Brian Barrett 2007-06-27 14:17:57 +00:00
родитель f88aa6c273
Коммит 6b3cd84403

Просмотреть файл

@ -240,6 +240,22 @@ add_extra_includes(const char *includes, const char* includedir)
}
static void
expand_flags(char **argv)
{
int i;
char *tmp;
for (i = 0 ; argv[i] != NULL ; ++i) {
tmp = opal_install_dirs_expand(argv[i]);
if (tmp != argv[i]) {
free(argv[i]);
argv[i] = tmp;
}
}
}
static void
data_callback(const char *key, const char *value)
{
@ -273,18 +289,21 @@ data_callback(const char *key, const char *value)
opal_argv_insert(&options_data[parse_options_idx].preproc_flags,
opal_argv_count(options_data[parse_options_idx].preproc_flags),
values);
expand_flags(options_data[parse_options_idx].preproc_flags);
opal_argv_free(values);
} else if (0 == strcmp(key, "compiler_flags")) {
char **values = opal_argv_split(value, ' ');
opal_argv_insert(&options_data[parse_options_idx].comp_flags,
opal_argv_count(options_data[parse_options_idx].comp_flags),
values);
expand_flags(options_data[parse_options_idx].comp_flags);
opal_argv_free(values);
} else if (0 == strcmp(key, "linker_flags")) {
char **values = opal_argv_split(value, ' ');
opal_argv_insert(&options_data[parse_options_idx].link_flags,
opal_argv_count(options_data[parse_options_idx].link_flags),
values);
expand_flags(options_data[parse_options_idx].link_flags);
opal_argv_free(values);
} else if (0 == strcmp(key, "libs")) {
char **values = opal_argv_split(value, ' ');