Skip to content

Commit beee018

Browse files
committed
cmd: llgo cppkg install
1 parent f26127c commit beee018

File tree

3 files changed

+119
-6
lines changed

3 files changed

+119
-6
lines changed

cmd/llgo/cppkg_cmd.gox

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2025 The GoPlus Authors (goplus.org). All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and limitations under the License.
14+
*/
15+
16+
import (
17+
"runtime"
18+
19+
self "github.com/goplus/llgo/xtool/cppkg"
20+
)
21+
22+
short "Manage C/C++ packages"
23+
24+
run => {
25+
help
26+
}

cmd/llgo/cppkg_install_cmd.gox

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2025 The GoPlus Authors (goplus.org). All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and limitations under the License.
14+
*/
15+
16+
import (
17+
"runtime"
18+
19+
self "github.com/goplus/llgo/xtool/cppkg"
20+
)
21+
22+
short "Install a C/C++ package from github.com/goplus/cppkg"
23+
24+
long `Installs a C/C++ package with the given name and version. For example:
25+
26+
llgo cppkg install davegamble/cjson@1.7.18
27+
`
28+
29+
run args => {
30+
if args.len < 1 {
31+
help
32+
return
33+
}
34+
35+
self.install args[0], self.DefaultFlags
36+
}

cmd/llgo/gop_autogen.go

Lines changed: 57 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)