| 170 | } |
| 171 | |
| 172 | static bool adjustOptionsOnIgnoreEnv(std::string& cppstr) { |
| 173 | // if there is a -ignore-env, adjust options. |
| 174 | bool optionChangable = true; |
| 175 | if (cppstr.size() > 0) { |
| 176 | // Set the options to be the string after -ignore-env |
| 177 | const char ignore_env[] = "-ignore-env"; |
| 178 | size_t pos = cppstr.find(ignore_env); |
| 179 | if (pos != std::string::npos) { |
| 180 | cppstr = cppstr.substr(pos + sizeof(ignore_env)); |
| 181 | optionChangable = false; |
| 182 | } |
| 183 | remove_g_option(cppstr); |
| 184 | } |
| 185 | return optionChangable; |
| 186 | } |
| 187 | |
| 188 | int32_t Program::compile(const std::vector<Device*>& devices, size_t numHeaders, |
| 189 | const std::vector<const Program*>& headerPrograms, |
no test coverage detected