Kaydet (Commit) a18ff3d5 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is empty

Hopefully should fix MSVC 2010 build...

Change-Id: I3dc71acfa58cdf65dfc6d731d9ebb77fd18f7fac
üst 0e3a462c
......@@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
vector<string> rawargs(argv + 1, argv + argc);
string command=getexe("REAL_CXX");
string flags=getexe("REAL_CXX_FLAGS");
string flags=getexe("REAL_CXX_FLAGS", true);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
......
......@@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
vector<string> rawargs(argv + 1, argv + argc);
string command=getexe("REAL_CC");
string flags=getexe("REAL_CC_FLAGS");
string flags=getexe("REAL_CC_FLAGS", true);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
......
......@@ -15,11 +15,14 @@
#define BUFLEN 2048
string getexe(string exename) {
string getexe(string exename, bool maybeempty) {
char* cmdbuf;
size_t cmdlen;
_dupenv_s(&cmdbuf,&cmdlen,exename.c_str());
if(!cmdbuf) {
if (maybeempty) {
return string();
}
cout << "Error " << exename << " not defined. Did you forget to source the environment?" << endl;
exit(1);
}
......
......@@ -16,7 +16,7 @@
using namespace std;
string getexe(string exename);
string getexe(string exename, bool maybeempty = false);
void setupccenv();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment