| 61 | } |
| 62 | |
| 63 | func (c *configureCmd) Command(celer *configs.Celer) *cobra.Command { |
| 64 | c.celer = celer |
| 65 | command := &cobra.Command{ |
| 66 | Use: "configure", |
| 67 | Short: "Configure settings for your workspace.", |
| 68 | Long: `Configure settings for your workspace. |
| 69 | |
| 70 | This command allows you to modify various configuration settings that affect |
| 71 | how celer works. You can configure one setting or one related group of settings |
| 72 | in a single command (do not mix flags from different groups). |
| 73 | |
| 74 | Available Configuration Options: |
| 75 | |
| 76 | Platform Configuration: |
| 77 | --platform Set the target platform (e.g., x86_64-linux-ubuntu-22.04-gcc-11.5.0) |
| 78 | |
| 79 | Project Configuration: |
| 80 | --project Set the current project configuration |
| 81 | |
| 82 | Build Configuration: |
| 83 | --build-type Set the build type (Release, Debug, RelWithDebInfo, MinSizeRel) |
| 84 | --downloads Set the download directory |
| 85 | --jobs Set the number of parallel build jobs |
| 86 | |
| 87 | Runtime Options: |
| 88 | --offline Enable/disable offline mode (true/false) |
| 89 | --verbose Enable/disable verbose output (true/false) |
| 90 | |
| 91 | PkgCache Configuration: |
| 92 | --pkgcache-dir Set the pkgcache directory path |
| 93 | --pkgcache-writable Set whether the package cache is writable (true/false) |
| 94 | --pkgcache-cache-artifacts Cache built artifacts into the package cache (true/false) |
| 95 | --pkgcache-cache-downloads Cache downloaded sources into the package cache (true/false) |
| 96 | |
| 97 | Proxy Configuration: |
| 98 | --proxy-host Set the proxy server hostname |
| 99 | --proxy-port Set the proxy server port number |
| 100 | |
| 101 | CCache Configuration: |
| 102 | --ccache-enabled Enable/disable ccache (true/false) |
| 103 | --ccache-dir Set the ccache directory path |
| 104 | --ccache-maxsize Set the maximum cache size (e.g., "5G", "1024M") |
| 105 | --ccache-remote-storage Set remote storage address for ccache (e.g., http://host:port/path) |
| 106 | --ccache-remote-only Use remote ccache only, skip local cache (true/false) |
| 107 | |
| 108 | Port Configuration: |
| 109 | --port Target port to update, in name@version form (e.g., eigen@3.4.0) |
| 110 | --port-url New source URL for the port (requires --port) |
| 111 | --port-ref New ref for the port — branch, tag, or commit (requires --port) |
| 112 | |
| 113 | Examples: |
| 114 | celer configure --platform=x86_64-linux-ubuntu-22.04-gcc-11.5.0 # Set target platform |
| 115 | celer configure --project=myproject # Set current project |
| 116 | celer configure --build-type=Release # Set build type to Release |
| 117 | celer configure --downloads=/home/xxx/Downloads # Set download directory |
| 118 | celer configure --jobs=8 # Use 8 parallel build jobs |
| 119 | celer configure --offline=true # Enable offline mode |
| 120 | celer configure --verbose=false # Disable verbose output |