MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / main

Function main

tensorflow/java/generate_pom.cc:21–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "tensorflow/c/c_api.h"
20
21int main(int argc, char** argv) {
22 std::string tmpl(R"EOF(
23<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
25
26 <modelVersion>4.0.0</modelVersion>
27 <groupId>org.tensorflow</groupId>
28 <artifactId>libtensorflow</artifactId>
29 <version>{{TENSORFLOW_VERSION}}</version>
30 <packaging>jar</packaging>
31
32 <name>tensorflow</name>
33 <url>https://www.tensorflow.org</url>
34 <inceptionYear>2015</inceptionYear>
35
36 <licenses>
37 <license>
38 <name>The Apache Software License, Version 2.0</name>
39 <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
40 <distribution>repo</distribution>
41 </license>
42 </licenses>
43
44 <scm>
45 <url>https://github.com/tensorflow/tensorflow.git</url>
46 <connection>git@github.com:tensorflow/tensorflow.git</connection>
47 <developerConnection>scm:git:https://github.com/tensorflow/tensorflow.git</developerConnection>
48 </scm>
49</project>
50 )EOF");
51
52 const std::string var("{{TENSORFLOW_VERSION}}");
53 const std::string val(TF_Version());
54 for (size_t pos = tmpl.find(var); pos != std::string::npos;
55 pos = tmpl.find(var)) {
56 tmpl.replace(pos, var.size(), val);
57 }
58 std::cout << tmpl;
59 return 0;
60}

Callers

nothing calls this directly

Calls 4

TF_VersionFunction · 0.85
replaceMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected