Skip to content

Commit

Permalink
Add user additional CMake arugments at the end. (#814)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ewaterlander authored Sep 12, 2024
1 parent 19a809d commit a65d3d7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException
}
}
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... */
{
Expand All @@ -94,6 +92,10 @@ CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException
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);
}
Expand Down

0 comments on commit a65d3d7

Please sign in to comment.