| 1909 | } |
| 1910 | |
| 1911 | void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp( |
| 1912 | Elem& e2, std::string const& config, std::string const& script, |
| 1913 | std::string const& additional_inputs, std::string const& outputs, |
| 1914 | std::string const& comment, cmCustomCommandGenerator const& ccg, |
| 1915 | bool symbolic, BuildInParallel buildInParallel) |
| 1916 | { |
| 1917 | std::string const cond = this->CalcCondition(config); |
| 1918 | if (buildInParallel == BuildInParallel::Yes && |
| 1919 | this->GlobalGenerator->IsBuildInParallelSupported()) { |
| 1920 | e2.WritePlatformConfigTag("BuildInParallel", cond, "true"); |
| 1921 | } |
| 1922 | e2.WritePlatformConfigTag("Message", cond, comment); |
| 1923 | e2.WritePlatformConfigTag("Command", cond, script); |
| 1924 | e2.WritePlatformConfigTag("AdditionalInputs", cond, additional_inputs); |
| 1925 | e2.WritePlatformConfigTag("Outputs", cond, outputs); |
| 1926 | // Turn off linking of custom command outputs. |
| 1927 | e2.WritePlatformConfigTag("LinkObjects", cond, "false"); |
| 1928 | if (symbolic && |
| 1929 | this->LocalGenerator->GetVersion() >= |
| 1930 | cmGlobalVisualStudioGenerator::VSVersion::VS16) { |
| 1931 | // VS >= 16.4 warn if outputs are not created, but one of our |
| 1932 | // outputs is marked SYMBOLIC and not expected to be created. |
| 1933 | e2.WritePlatformConfigTag("VerifyInputsAndOutputsExist", cond, "false"); |
| 1934 | } |
| 1935 | |
| 1936 | std::string depfile = ccg.GetFullDepfile(); |
| 1937 | if (!depfile.empty()) { |
| 1938 | this->HaveCustomCommandDepfile = true; |
| 1939 | std::string internal_depfile = ccg.GetInternalDepfile(); |
| 1940 | ConvertToWindowsSlash(internal_depfile); |
| 1941 | e2.WritePlatformConfigTag("DepFileAdditionalInputsFile", cond, |
| 1942 | internal_depfile); |
| 1943 | } |
| 1944 | } |
| 1945 | |
| 1946 | void cmVisualStudio10TargetGenerator::WriteCustomRuleCSharp( |
| 1947 | Elem& e0, std::string const& config, std::string const& name, |
no test coverage detected