-
Notifications
You must be signed in to change notification settings - Fork 125
Description
OS: OSX/Darwin (testing on travis).
setup checks the command line arguments for -DCMAKE_OSX_DEPLOYMENT_TARGET and for -DCMAKE_OSX_ARCHITECTURES, and if they don't exist, it defaults them here. The issue with this is that if the user passed either of those arguments to setup via a kwarg. i.e. setup(..., cmake_args=[..., "-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.7"]), it gets overwritten with the default, even when nothing had been passed to the command line.
This causes builds to break for no apparent reason (see the reasons for this PR). A simple fix is moving the lines where the command line arguments are added to the arguments passed via kwarg from here to right above the block mentioned above.
Since cmake_args is not referenced between line 477 and line 503, nothing will get more args than it expected, and CLI will still override the args passed via kwarg, but default will only be set if neither the CLI or kwarg cmake_arg are set.
If this is approved I will PR the fix described above.
(This is an issue first because the contribution guidelines specify filing bugs before trying to fix them).