Commit 9d37edc5 authored by Andreas Dedner's avatar Andreas Dedner

check if DUNE_CMAKE is set and use that instead of 'cmake' as build command

parent 5b937092
Pipeline #16930 passed with stage
in 12 minutes and 50 seconds
......@@ -327,6 +327,11 @@ def is_installed(dir, module=None):
except KeyError:
return False
def get_cmake_command():
try:
return os.environ['DUNE_CMAKE']
except KeyError:
return 'cmake'
def get_module_path():
try:
......@@ -414,7 +419,7 @@ def configure_module(srcdir, builddir, prefix_dirs, definitions=None):
Returns:
Output of CMake command
"""
args = ['cmake']
args = get_cmake_command()
if definitions is None:
pass
elif isinstance(definitions, dict):
......@@ -448,7 +453,7 @@ def build_module(builddir, build_args=None):
if build_args is None:
build_args = get_default_build_args()
cmake_args = ['cmake', '--build', '.']
cmake_args = [get_cmake_command(), '--build', '.']
if build_args is not None:
cmake_args += ['--'] + build_args
......
......@@ -36,7 +36,8 @@ class Builder:
comm.barrier()
def compile(self, target='all'):
cmake_args = ["cmake", "--build", self.dune_py_dir, "--target", target]
cmake_command = dune.common.module.get_cmake_command()
cmake_args = [cmake_command, "--build", self.dune_py_dir, "--target", target]
if self.build_args is not None:
cmake_args += ['--'] + self.build_args
cmake = subprocess.Popen(cmake_args, cwd=self.generated_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment