Skip to content

Gg/cmake from local files #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/building_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,9 @@ default is empty.
- __url__: The URL of the package to build. One of this parameter or
the `repository` or `package` parameters must be specified.

- __unpack_download__: if the `url` or `package` specified needs to be unpacked.
The default is True

__Examples__


Expand Down Expand Up @@ -4546,5 +4549,3 @@ __Examples__
```python
yum(ospackages=['make', 'wget'])
```


13 changes: 11 additions & 2 deletions hpccm/building_blocks/generic_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ class generic_cmake(bb_base, hpccm.templates.CMakeBuild,
url: The URL of the package to build. One of this parameter or
the `repository` or `package` parameters must be specified.

unpack_download: if the URL or package specified needs to be unpacked.
The default is True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default is True
The default is True.


# Examples

```python
Expand Down Expand Up @@ -196,6 +199,7 @@ def __init__(self, **kwargs):
self.__run_arguments = kwargs.get('_run_arguments', None)
self.runtime_environment_variables = kwargs.get('runtime_environment', {})
self.__toolchain = kwargs.get('toolchain', toolchain())
self.__unpack_download = kwargs.get('unpack_download', True)

self.__commands = [] # Filled in by __setup()
self.__wd = '/var/tmp' # working directory
Expand Down Expand Up @@ -230,8 +234,13 @@ def __setup(self):
self.__commands"""

# Get source
self.__commands.append(self.download_step(recursive=self.__recursive,
wd=self.__wd))
self.__commands.append(
self.download_step(
recursive=self.__recursive,
wd=self.__wd,
unpack=self.__unpack_download
)
)

# directory containing the unarchived package
if self.__directory:
Expand Down