[ClavaLaraApi] Updates Compilation to support lib and project deps
@@ -17,6 +17,10 @@ Compilation.addExtraInclude = function(path) {
Compilation.addExtraIncludeFromGit = function(gitRepository, path) {
+ if(isUndefined(path)) {
+ path = null;
+ }
+
Clava.getProgram().addExtraIncludeFromGit(gitRepository, path);
}
@@ -27,5 +31,33 @@ Compilation.addExtraSource = function(path) {
Compilation.addExtraSourceFromGit = function(gitRepository, path) {
+ if(isUndefined(path)) {
+ path = null;
+ }
+
Clava.getProgram().addExtraSourceFromGit(gitRepository, path);
}
+
+/**
+ * Adds a project from a git repository. The project should be ready to build.
+ *
+ * libs - the list of library names exposed by the project
+ * */
+Compilation.addProjectFromGit = function(gitRepository, libs, path) {
+ if(isUndefined(path)) {
+ path = null;
+ }
+ Clava.getProgram().addProjectFromGit(gitRepository, libs, path);
+}
+
+Compilation.addExtraLib = function(lib) {
+ Clava.getProgram().addExtraLib(lib);
+}
+
+Compilation.getExtraProjects = function() {
+ return Clava.getProgram().getExtraProjects();
+}
+
+Compilation.getExtraLibs = function() {
+ return Clava.getProgram().getExtraLibs();
+}
