Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 557280 - cmake-utils.eclass: mycmakeargs & MYCMAKEARGS are different variables with special behavior
Summary: cmake-utils.eclass: mycmakeargs & MYCMAKEARGS are different variables with sp...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 06:27 UTC by Michał Górny
Modified: 2017-06-24 16:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-08-11 06:27:43 UTC
This is really awfully ugly. Long story short:

    local cmakeargs=(
        ${warn_unused_cli}
        -C "${common_config}"
        -G "$(_generator_to_use)"
        -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}"
        "${mycmakeargs_local[@]}" # <-- here mycmakeargs are added
        -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
        -DCMAKE_INSTALL_DO_STRIP=OFF
        -DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}"
        -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}"
        "${MYCMAKEARGS}" # <-- here MYCMAKEARGS are added
    )

So we have two variables different only in capitalization with different behavior and without any documentation. I dare those are supposed to be two different variable names, like mycmakeargs_post or something.
Comment 1 Michael Palimaka (kensington) gentoo-dev 2015-08-11 12:03:33 UTC
It's like EXTRA_ECONF. I'm not sure what we can do about it without breaking any unknown users.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-08-11 14:05:53 UTC
I suggest:

1. adding mycmakeargs_post[@] (note: it's an array this time :P),

2. keeping MYCMAKEARGS backwards compat with eqawarn.
Comment 3 Michael Palimaka (kensington) gentoo-dev 2015-08-11 14:21:22 UTC
That seems reasonable. How about a name like EXTRA_CMAKEARGS instead in line with the EXTRA_ECONF theme?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-08-11 14:47:46 UTC
Nah. EXTRA_* scheme is for make.conf, not ebuilds.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2017-06-24 15:43:43 UTC
(In reply to Michał Górny from comment #4)
> Nah. EXTRA_* scheme is for make.conf, not ebuilds.

MYCMAKEARGS is not supposed to be used in ebuilds AFAIK.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2017-06-24 16:16:16 UTC
If you see someone using it in an ebuild, tell them not to.