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

Allow tools.gnu:make_program to work in every case #14223

Merged

Conversation

AbrilRBS
Copy link
Member

@AbrilRBS AbrilRBS commented Jul 4, 2023

Changelog: Fix: Allow tools.gnu:make_program to affect every CMake configuration.
Docs: Omit

The PR that implemented it was #10770 and already had a check for only mingw, but sadly no insight into why it was gated off of the rest of configurations. After checking a bit and not seeing anything that might be wrong with allowing it, I'm proposing to allow it in every configuration

Closes #14197

@AbrilRBS AbrilRBS requested a review from memsharded July 4, 2023 14:29
@AbrilRBS AbrilRBS added this to the 2.0.8 milestone Jul 4, 2023
@AbrilRBS AbrilRBS changed the title Allow tools.gnu:make_program to work in every case Allow tools.gnu:make_program to work in every case Jul 4, 2023
Copy link
Member

@memsharded memsharded 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, if it doesn't break anything, I think we can add an integration test to cover it and it could be merged.

@AbrilRBS
Copy link
Member Author

AbrilRBS commented Jul 5, 2023

I think we can add an integration test to cover it and it could be merged.

I didn't initially add one becase the test that is already there looked fine, but after double checking, it does not hurt to add an extra check! Good catch :)

@AbrilRBS AbrilRBS requested a review from memsharded July 5, 2023 00:19
@memsharded
Copy link
Member

I didn't initially add one becase the test that is already there looked fine, but after double checking, it does not hurt to add an extra check! Good catch :)

By definition, the test is not there, because the necessary test is one that will not be using mingw. It should be a red-green test, failing without the fix, passing with the fix.

default=cache_variables.get("CMAKE_MAKE_PROGRAM"))
if cmake_make_program:
cmake_make_program = cmake_make_program.replace("\\", "/")
cache_variables["CMAKE_MAKE_PROGRAM"] = cmake_make_program
Copy link
Member

Choose a reason for hiding this comment

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

I know this was already there, and not strictly related to this PR. But why is it a cache variable (presets) and not a toolchain one? Because it means that this is an extra things that users not using presets should remember to pass in the command line too. It would be worth checking if this works in the toolchain (probably will fail, and this is the reason it is a cache variable)

@czoido czoido merged commit 1ed2185 into conan-io:release/2.0 Jul 11, 2023
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

Successfully merging this pull request may close these issues.

How to properly set CMAKE_MAKE_PROGRAM?
3 participants