| 253 | enum ClType : std::uint8_t { Compile, Include, Precompile, NoPch }; |
| 254 | |
| 255 | static std::string make_vcxproj_cl_entry(const std::string& file, ClType type) |
| 256 | { |
| 257 | std::string outstr; |
| 258 | if (type == Precompile) { |
| 259 | outstr += R"( <ClCompile Include=")"; |
| 260 | outstr += file; |
| 261 | outstr += R"(">)"; |
| 262 | outstr += "\r\n"; |
| 263 | outstr += R"( <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>)"; |
| 264 | outstr += "\r\n"; |
| 265 | outstr += R"( <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>)"; |
| 266 | outstr += "\r\n"; |
| 267 | outstr += R"( <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release-PCRE|x64'">Create</PrecompiledHeader>)"; |
| 268 | outstr += "\r\n"; |
| 269 | outstr += R"( <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug-PCRE|x64'">Create</PrecompiledHeader>)"; |
| 270 | outstr += "\r\n"; |
| 271 | outstr += " </ClCompile>\r\n"; |
| 272 | return outstr; |
| 273 | } |
| 274 | if (type == NoPch) { |
| 275 | outstr += R"( <ClCompile Include=")"; |
| 276 | outstr += file; |
| 277 | outstr += R"(">)"; |
| 278 | outstr += "\r\n"; |
| 279 | outstr += R"( <PrecompiledHeader>NotUsing</PrecompiledHeader>)"; |
| 280 | outstr += "\r\n"; |
| 281 | outstr += R"( <ForcedIncludeFiles></ForcedIncludeFiles>)"; |
| 282 | outstr += "\r\n"; |
| 283 | outstr += " </ClCompile>\r\n"; |
| 284 | return outstr; |
| 285 | } |
| 286 | outstr += " <"; |
| 287 | outstr += (type == Compile) ? "ClCompile" : "ClInclude"; |
| 288 | outstr += R"( Include=")"; |
| 289 | outstr += file; |
| 290 | outstr += R"(" />)"; |
| 291 | outstr += "\r\n"; |
| 292 | return outstr; |
| 293 | } |
| 294 | |
| 295 | static std::vector<std::string> prioritizelib(const std::vector<std::string>& libfiles) |
| 296 | { |