Skip to content
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

cmakemake easyblock add -DCMAKE_ #36

Open
bartoldeman opened this issue Nov 9, 2020 · 3 comments
Open

cmakemake easyblock add -DCMAKE_ #36

bartoldeman opened this issue Nov 9, 2020 · 3 comments

Comments

@bartoldeman
Copy link

cmakemake.py has this:

        sysroot = build_option('sysroot')
        if sysroot:
            options.append('-DCMAKE_SYSROOT=%s' % sysroot)
            self.log.info("Using absolute path to compiler commands because of alterate sysroot %s", sysroot)
            self.cfg['abs_path_compilers'] = True

however I think it would be better to patch cmake itself, ie. via cmake.py so that users don't need to add those options.

That means porting this technique to the easyblock cmake.py:

sed -i -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|$EBROOTGENTOO/$(gcc -dumpmachine)/lib/|g" \
       -e "/@GENTOO_HOST@/d" \
       -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
       'Modules/Platform/{UnixPaths,Darwin}.cmake

combined with this patch:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/cmake/files/cmake-3.14.0_rc3-prefix-dirs.patch

I'll work on a PR to put that logic in the cmake easyblock.

@boegel
Copy link
Contributor

boegel commented Nov 22, 2020

Only adding -DCMAKE_SYSROOT was a bit naive apparently, a better approach for CMakeMake is implemented in easybuilders/easybuild-easyblocks#2247 .

Patching the CMake installation itself so it also works properly outside of EasyBuild also makes sense, but is definitely trickier...

@boegel
Copy link
Contributor

boegel commented Nov 22, 2020

The patched CMakeMake isn't working out very well, patching CMake itself is probably a better idea indeed; see easybuilders/easybuild-easyblocks#2248 .

@boegel
Copy link
Contributor

boegel commented Feb 27, 2021

@bartoldeman We should try and get easybuilders/easybuild-easyblocks#2248 merged soon, let me know when you'd have some time to look into this together...

TopRichard pushed a commit to TopRichard/bot-software-layer1 that referenced this issue Apr 4, 2023
…-QuantumESPRESSO

Adding QuantumESPRESSO to NESSI/2022.11
Neves-P added a commit to Neves-P/software-layer that referenced this issue Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants