public void NewVariable(string name, string value) { CMakeCommand command = new CMakeCommand("set", null, this); command.AddArgument(name); command.AddArgument(value); setCommands.Add(string.Format("{0}:{1}{2}", "set", "new", setCommands.Count), command); allCommands.Add(string.Format("{0}:{1}{2}", "set", "new", allCommands.Count), command); }
public void NewTarget(string name, CMakeTarget.Types type) { string commandName = ""; string libraryType = ""; switch (type) { case CMakeTarget.Types.Binary: commandName = "add_executable"; break; case CMakeTarget.Types.SharedLibrary: commandName = "add_library"; libraryType = "SHARED"; break; case CMakeTarget.Types.StaticLibrary: commandName = "add_library"; libraryType = "STATIC"; break; case CMakeTarget.Types.Module: commandName = "add_library"; libraryType = "MODULE"; break; case CMakeTarget.Types.ObjectLibrary: commandName = "add_library"; libraryType = "OBJECT"; break; case CMakeTarget.Types.Unknown: commandName = "add_library"; libraryType = "UNKNOWN"; break; default: commandName = "add_executable"; LoggingService.LogDebug("Unknown target type: {0}", type); break; } CMakeCommand command = new CMakeCommand(commandName, null, this); command.AddArgument(name); if (!string.IsNullOrEmpty(libraryType)) { command.AddArgument(libraryType); } allCommands.Add(string.Format("{0}:{1}{2}", commandName, "new", allCommands.Count), command); SaveAll(); Parse(); }
public void AddFile(string filename) { command.AddArgument(filename); }