Hopefully better handling of C++ targets
This commit is contained in:
parent
bf65f88f4b
commit
afdfa13eff
@ -532,24 +532,30 @@ static void _targets_cflags(Configure * configure, FILE * fp)
|
|||||||
|
|
||||||
static void _targets_cxxflags(Configure * configure, FILE * fp)
|
static void _targets_cxxflags(Configure * configure, FILE * fp)
|
||||||
{
|
{
|
||||||
String const * p;
|
String const * cxx;
|
||||||
String const * q;
|
String const * cxxff;
|
||||||
|
String const * cxxf;
|
||||||
|
|
||||||
if((p = config_get(configure->config, NULL, "cxxflags_force")) != NULL)
|
cxx = config_get(configure->config, NULL, "cxx");
|
||||||
|
cxxff = config_get(configure->config, NULL, "cxxflags_force");
|
||||||
|
cxxf = config_get(configure->config, NULL, "cxxflags");
|
||||||
|
if(cxx != NULL || cxxff != NULL || cxxf != NULL)
|
||||||
{
|
{
|
||||||
_makefile_output_variable(fp, "CXX", configure->programs.cxx);
|
if(cxx == NULL)
|
||||||
fprintf(fp, "%s%s", "CXXFLAGSF= ", p);
|
cxx = configure->programs.cxx;
|
||||||
if(configure->os == HO_GNU_LINUX && string_find(p, "-ansi"))
|
_makefile_output_variable(fp, "CXX", cxx);
|
||||||
|
}
|
||||||
|
if(cxxff != NULL)
|
||||||
|
{
|
||||||
|
fprintf(fp, "%s%s", "CXXFLAGSF= ", cxxff);
|
||||||
|
if(configure->os == HO_GNU_LINUX && string_find(cxxff, "-ansi"))
|
||||||
fprintf(fp, "%s", " -D _GNU_SOURCE");
|
fprintf(fp, "%s", " -D _GNU_SOURCE");
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
}
|
}
|
||||||
if((q = config_get(configure->config, NULL, "cxxflags")) != NULL)
|
if(cxxf != NULL)
|
||||||
{
|
{
|
||||||
if(p == NULL)
|
fprintf(fp, "%s%s", "CXXFLAGS= ", cxxf);
|
||||||
_makefile_output_variable(fp, "CXX",
|
if(configure->os == HO_GNU_LINUX && string_find(cxxf, "-ansi"))
|
||||||
configure->programs.cxx);
|
|
||||||
fprintf(fp, "%s%s", "CXXFLAGS= ", q);
|
|
||||||
if(configure->os == HO_GNU_LINUX && string_find(q, "-ansi"))
|
|
||||||
fprintf(fp, "%s", " -D _GNU_SOURCE");
|
fprintf(fp, "%s", " -D _GNU_SOURCE");
|
||||||
fputc('\n', fp);
|
fputc('\n', fp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user