| 1925 | } |
| 1926 | |
| 1927 | Json::Value Target::DumpCompileData(CompileData const& cd) |
| 1928 | { |
| 1929 | Json::Value result = Json::objectValue; |
| 1930 | |
| 1931 | if (!cd.Language.empty()) { |
| 1932 | result["language"] = cd.Language; |
| 1933 | } |
| 1934 | if (!cd.Sysroot.empty()) { |
| 1935 | result["sysroot"] = this->DumpSysroot(cd.Sysroot); |
| 1936 | } |
| 1937 | if (!cd.Flags.empty()) { |
| 1938 | result["compileCommandFragments"] = this->DumpCommandFragments(cd.Flags); |
| 1939 | } |
| 1940 | if (!cd.Includes.empty()) { |
| 1941 | Json::Value includes = Json::arrayValue; |
| 1942 | for (auto const& i : cd.Includes) { |
| 1943 | includes.append(this->DumpInclude(i)); |
| 1944 | } |
| 1945 | result["includes"] = includes; |
| 1946 | } |
| 1947 | if (!cd.Frameworks.empty()) { |
| 1948 | Json::Value frameworks = Json::arrayValue; |
| 1949 | for (auto const& i : cd.Frameworks) { |
| 1950 | frameworks.append(this->DumpFramework(i)); |
| 1951 | } |
| 1952 | result["frameworks"] = frameworks; |
| 1953 | } |
| 1954 | if (!cd.Defines.empty()) { |
| 1955 | Json::Value defines = Json::arrayValue; |
| 1956 | for (JBT<std::string> const& d : cd.Defines) { |
| 1957 | defines.append(this->DumpDefine(d)); |
| 1958 | } |
| 1959 | result["defines"] = std::move(defines); |
| 1960 | } |
| 1961 | if (!cd.PrecompileHeaders.empty()) { |
| 1962 | Json::Value precompileHeaders = Json::arrayValue; |
| 1963 | for (JBT<std::string> const& pch : cd.PrecompileHeaders) { |
| 1964 | precompileHeaders.append(this->DumpPrecompileHeader(pch)); |
| 1965 | } |
| 1966 | result["precompileHeaders"] = std::move(precompileHeaders); |
| 1967 | } |
| 1968 | if (!cd.LanguageStandard.Value.empty()) { |
| 1969 | result["languageStandard"] = |
| 1970 | this->DumpLanguageStandard(cd.LanguageStandard); |
| 1971 | } |
| 1972 | |
| 1973 | return result; |
| 1974 | } |
| 1975 | |
| 1976 | Json::Value Target::DumpInclude(CompileData::IncludeEntry const& inc) |
| 1977 | { |
no test coverage detected