MCPcopy Create free account
hub / github.com/Kitware/CMake / WriteCustomRuleCpp

Method WriteCustomRuleCpp

Source/cmVisualStudio10TargetGenerator.cxx:1911–1944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1909}
1910
1911void 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
1946void cmVisualStudio10TargetGenerator::WriteCustomRuleCSharp(
1947 Elem& e0, std::string const& config, std::string const& name,

Callers 1

WriteCustomRuleMethod · 0.95

Calls 8

CalcConditionMethod · 0.95
ConvertToWindowsSlashFunction · 0.85
GetFullDepfileMethod · 0.80
GetInternalDepfileMethod · 0.80
GetVersionMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected