Skip to content

Commit

Permalink
Merge branch 'ng/find_only' into 'master'
Browse files Browse the repository at this point in the history
add a method to get the path of a projet in the worktree by name

See merge request qi/qibuild!120
  • Loading branch information
Nicolas GARGAUD committed Jul 9, 2020
2 parents 9961c42 + 8f55475 commit 92a038d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
6 changes: 6 additions & 0 deletions doc/source/changes/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ qibuild

* Restrict hardening to Unix systems.
* find.cmake: Fix export_lib_pkgconfig for cross-compiling.
* Add method to get the absolute path of a project with:

```
qibuild info --path <project>
```

* The target defined in the toolchain feed is now propagated to cmake in C++ macros.
To use it in your cmakelist:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.in.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
sys.path.insert(0, os.path.abspath('../../python'))

project = "qiBuild"
version = "3.14.1"
version = "3.15"
release = version
extensions = list()
extensions.append("cmakedomain")
Expand Down
16 changes: 11 additions & 5 deletions python/qibuild/actions/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from __future__ import unicode_literals
from __future__ import print_function

import os
import qisrc.parsers
import qibuild.parsers
import qisys.parsers
Expand All @@ -17,6 +18,8 @@ def configure_parser(parser):
""" Configure parser for this action. """
qisys.parsers.worktree_parser(parser)
parser.add_argument("name", nargs="?")
parser.add_argument("--path", "-p", action="store_true",
help="Return only the absolute path to the projects")


def do(args):
Expand All @@ -31,8 +34,11 @@ def do(args):
git_worktree = qisrc.parsers.get_git_worktree(args)
git_project = qisys.parsers.find_parent_project(git_worktree.git_projects,
build_project.path)
mess = "Build project: %s\n" % build_project.name
mess += "src: %s\n" % build_project.src
if git_project:
mess += "repo: %s" % git_project.name
ui.info(mess)
if args.path:
ui.info(os.path.join(build_worktree.root, build_project.src))
else:
mess = "Build project: %s\n" % build_project.name
mess += "src: %s\n" % build_project.src
if git_project:
mess += "repo: %s" % git_project.name
ui.info(mess)

0 comments on commit 92a038d

Please sign in to comment.