fix workaround bug

This commit is contained in:
bolero-MURAKAMI 2015-01-29 00:55:00 +09:00
parent 4ecca97b78
commit d29b783b68
2 changed files with 16 additions and 2 deletions

View file

@ -241,6 +241,7 @@ void collect_sysinclude_paths(OutputIterator result, std::string const& command
int main(int argc, const char* argv[]) {
std::string src;
std::string command;
std::string text;
if (argc >= 2) {
@ -253,6 +254,9 @@ int main(int argc, const char* argv[]) {
std::istreambuf_iterator<char>()
);
}
if (argc >= 3) {
command = argv[2];
}
try {
// プリプロセッサを用意
@ -272,9 +276,19 @@ int main(int argc, const char* argv[]) {
)
);
// インクルードパスの設定
if (!command.empty()) {
std::cout
<< "collect command :\n"
<< command << "\n"
;
}
{
std::vector<std::string> list;
::collect_sysinclude_paths(std::back_inserter(list));
if (command.empty()) {
::collect_sysinclude_paths(std::back_inserter(list));
} else {
::collect_sysinclude_paths(std::back_inserter(list), command);
}
std::cout
<< "sysinclude paths :\n"
;