Skip to content

Overhaul CMake build options #1055

@betamaxbandit

Description

@betamaxbandit

While working on #1046 I came across a few broken cmake build options.

  1. fix typo in defintion and api names:
    org.eclipse.cdt.cmake.core.properties.ICMakeProperties.setWarnUnitialized(boolean)
  2. remove cmake deprecated options
    org.eclipse.cdt.cmake.core.properties.ICMakeProperties.setWarnUnused(boolean)

This list is not exhaustive; there may be other items to address.

The option values are assigned here:
org.eclipse.cdt.cmake.core.internal.CommandDescriptorBuilder.makeCMakeCommandline(Path)

public CommandDescriptor makeCMakeCommandline(Path toolChainFile) throws CoreException {
	List<String> args = new ArrayList<>();
	List<String> env = new ArrayList<>();

	// defaults for all OSes...
	args.add(CMakeBuildConfiguration.BUILD_COMMAND_DEFAULT);
	/* add general settings */
	if (cmakeProperties.isWarnNoDev())
		args.add("-Wno-dev"); //$NON-NLS-1$
	if (cmakeProperties.isDebugTryCompile())
		args.add("--debug-trycompile"); //$NON-NLS-1$
	if (cmakeProperties.isDebugOutput())
		args.add("--debug-output"); //$NON-NLS-1$
	if (cmakeProperties.isTrace())
		args.add("--trace"); //$NON-NLS-1$
	if (cmakeProperties.isWarnUnitialized())
		args.add("--warn-unitialized"); //$NON-NLS-1$
	if (cmakeProperties.isWarnUnused())
		args.add("--warn-unused"); //$NON-NLS-1$

cc: @jonahgraham

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions