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

[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD #17699

Merged
merged 1 commit into from Apr 20, 2020

Conversation

fuzzard
Copy link
Contributor

@fuzzard fuzzard commented Apr 19, 2020

Description

Currently if supplying multiple arguments for ADDONS_TO_BUILD that include a regex

ADDONS_TO_BUILD='game.libretro.* peripheral.joystick'

The regex will not match or be processed at all.
You currently need to explicitly set each if you include multiple arguments

ADDONS_TO_BUILD='game.libretro.2048 game.libretro.mrboom peripheral.joystick'

Motivation and Context

Playing with libretro addons, found that a regex isnt used if supplied in a multi argument addons_to_build

How Has This Been Tested?

Mac OS building multiple combinations of selective arguments

ADDONS_TO_BUILD='game.libretro.* peripheral.joystick'

exact match of game.libretro and peripheral.joystick, regex match of game.libretro.mrboom, game.libretro.2048

ADDONS_TO_BUILD='game.libretro peripheral.joystick'

exact match of game.libretro and peripheral.joystick, regex match of game.libretro.mrboom, game.libretro.2048

ADDONS_TO_BUILD='pvr.hdhomerun pvr.argus* peripheral.joystick'

Exact match of pvr.hdhomerun and peripheral.joystick, with regex match of pvr.argustv

This also highlights an existing behaviour regarding the core game.libretro. You cannot selectively only build game.libretro as all other game.libretro.* automatically match with the cmake if check. This behaviour does not change with this PR.

elseif(id MATCHES "${ADDONS_TO_BUILD}")

I think the easier way to resolve this would be to rename game.libretro to something like game.libretro.core. I couldnt come up with anything easy to handle this case, and game.libretro is the only case i could find this happens to across any binary addons. No other active binary addon, has the name that is a subset of other active addons

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@fuzzard fuzzard requested a review from AlwinEsch April 19, 2020 08:32
@fuzzard fuzzard added CMake Component: Add-ons Type: Improvement non-breaking change which improves existing functionality v19 Matrix labels Apr 19, 2020
@fuzzard fuzzard added this to the Matrix 19.0-alpha 1 milestone Apr 19, 2020
Copy link
Contributor

@phunkyfish phunkyfish left a comment

Choose a reason for hiding this comment

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

Nice change. Tested locally, works well.

Copy link
Member

@AlwinEsch AlwinEsch left a comment

Choose a reason for hiding this comment

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

Your changes are good to have for such cases 👍.
Thanks for this.

cmake/addons/CMakeLists.txt Show resolved Hide resolved
cmake/addons/CMakeLists.txt Outdated Show resolved Hide resolved
Currently if supplying multiple arguments for ADDONS_TO_BUILD that include a regex
eg. ADDONS_TO_BUILD='game.libretro.* peripheral.joystick'
The regex will not match or be processed
Copy link
Member

@wsnipex wsnipex left a comment

Choose a reason for hiding this comment

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

looks good

@fuzzard fuzzard merged commit 9fab130 into xbmc:master Apr 20, 2020
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Apr 20, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request May 5, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 3, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 4, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 5, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 6, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
Maven85 pushed a commit to Maven85/kodi that referenced this pull request Aug 7, 2020
[cmake] addons support multiple regex arguments for ADDONS_TO_BUILD
@fuzzard fuzzard deleted the cmake_addonsregex branch April 2, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Component: Add-ons Type: Improvement non-breaking change which improves existing functionality v19 Matrix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants