Add user additional CMake arugments at the end. (#814)

The additional CMake arguments added by the user in the launch
configuration UI are added at the end of the CMake command, such that
the user is able to override arguments set by the system.
This commit is contained in:
ewaterlander 2024-09-12 23:16:52 +02:00 committed by GitHub
parent 19a809d3e5
commit a65d3d7f28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,8 +78,6 @@ class CommandDescriptorBuilder {
}
}
CommandDescriptorBuilder.appendCMakeArguments(args, cmakeProperties.getExtraArguments());
/* add settings for the operating system we are running under */
CommandDescriptorBuilder.appendCMakeOsOverrideArgs(args, overridesSelector.getOsOverrides(cmakeProperties));
/* at last, add our requirements that override extra args specified by the user... */
{
@ -94,6 +92,10 @@ class CommandDescriptorBuilder {
if (toolChainFile != null) {
args.add("-DCMAKE_TOOLCHAIN_FILE=" + toolChainFile.toString()); //$NON-NLS-1$
}
/* Add settings for the operating system we are running under,
* and the user additional CMake arguments set in the Launch Configuration UI.
*/
CommandDescriptorBuilder.appendCMakeOsOverrideArgs(args, overridesSelector.getOsOverrides(cmakeProperties));
return new CommandDescriptor(args, env);
}