Skip to content

Commit

Permalink
Convert CMakeMake easyblock to run_shell_cmd.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoldeman committed Dec 6, 2023
1 parent 714bd2c commit 1cabe3c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions easybuild/easyblocks/generic/cmakemake.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from easybuild.tools.filetools import change_dir, create_unused_dir, mkdir, which
from easybuild.tools.environment import setvar
from easybuild.tools.modules import get_software_root, get_software_version
from easybuild.tools.run import run_cmd
from easybuild.tools.run import run_shell_cmd
from easybuild.tools.systemtools import get_shared_lib_ext
from easybuild.tools.utilities import nub

Expand All @@ -63,8 +63,8 @@ def det_cmake_version():
regex = re.compile(r"^[cC][mM]ake version (?P<version>[0-9]\.[0-9a-zA-Z.-]+)$", re.M)

cmd = "cmake --version"
(out, _) = run_cmd(cmd, simple=False, log_ok=False, log_all=False, trace=False)
res = regex.search(out)
cmd_res = run_shell_cmd(cmd, hidden=True)
res = regex.search(cmd_res.output)
if res:
cmake_version = res.group('version')
else:
Expand Down Expand Up @@ -311,9 +311,9 @@ def configure_step(self, srcdir=None, builddir=None):
self.cfg.get('configure_cmd'),
self.cfg['configopts']])

(out, _) = run_cmd(command, log_all=True, simple=False)
res = run_shell_cmd(command)

return out
return res.output

def test_step(self):
"""CMake specific test setup"""
Expand Down

0 comments on commit 1cabe3c

Please sign in to comment.