Fix cmake invocation.
This commit is contained in:
parent
43222bc91d
commit
6f67102144
3 changed files with 19 additions and 2 deletions
|
@ -784,7 +784,7 @@ class Meson(BuildSystem):
|
|||
|
||||
def _setup(self, session, fixers):
|
||||
if not session.exists("build"):
|
||||
session.check_call(["mkdir", "build"])
|
||||
session.mkdir("build")
|
||||
run_with_build_fixers(session, ["meson", "setup", "build"], fixers)
|
||||
|
||||
def clean(self, session, resolver, fixers):
|
||||
|
@ -1077,6 +1077,8 @@ class Make(BuildSystem):
|
|||
elif any([os.path.exists(os.path.join(path, n))
|
||||
for n in ['configure.ac', 'configure.in', 'autogen.sh']]):
|
||||
self.name = 'autoconf'
|
||||
elif os.path.exists(os.path.join(path, "CMakeLists.txt")):
|
||||
self.name = 'cmake'
|
||||
else:
|
||||
self.name = "make"
|
||||
|
||||
|
@ -1122,6 +1124,10 @@ class Make(BuildSystem):
|
|||
):
|
||||
run_with_build_fixers(session, ["qmake"], fixers)
|
||||
|
||||
if not makefile_exists() and session.exists('CMakeLists.txt'):
|
||||
session.mkdir('build')
|
||||
run_with_build_fixers(session, ["cmake", '..'], fixers, cwd='build')
|
||||
|
||||
def build(self, session, resolver, fixers):
|
||||
self.setup(session, resolver, fixers)
|
||||
self._run_make(session, ["all"], fixers)
|
||||
|
@ -1141,8 +1147,12 @@ class Make(BuildSystem):
|
|||
if line.startswith("The project was not configured"):
|
||||
return True
|
||||
return False
|
||||
if session.exists('build'):
|
||||
cwd = 'build'
|
||||
else:
|
||||
cwd = None
|
||||
try:
|
||||
run_with_build_fixers(session, ["make"] + args, fixers)
|
||||
run_with_build_fixers(session, ["make"] + args, fixers, cwd=cwd)
|
||||
except UnidentifiedError as e:
|
||||
if len(e.lines) < 5 and any([_wants_configure(line) for line in e.lines]):
|
||||
extra_args = []
|
||||
|
|
|
@ -97,6 +97,9 @@ class PlainSession(Session):
|
|||
def chdir(self, path):
|
||||
os.chdir(path)
|
||||
|
||||
def mkdir(self, path):
|
||||
os.mkdir(path)
|
||||
|
||||
def external_path(self, path):
|
||||
return os.path.abspath(path)
|
||||
|
||||
|
|
|
@ -199,6 +199,10 @@ class SchrootSession(Session):
|
|||
fullpath = self.external_path(path)
|
||||
return os.scandir(fullpath)
|
||||
|
||||
def mkdir(self, path: str):
|
||||
fullpath = self.external_path(path)
|
||||
return os.mkdir(fullpath)
|
||||
|
||||
def setup_from_vcs(
|
||||
self, tree, include_controldir: Optional[bool] = None, subdir="package"
|
||||
):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue