forked from eclipse-cdt/cdt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API to set CMake generator default (eg Ninja)
ISV can set their desired CMake generator default (eg Ninja). Addresses Issue: CDT CMake Improvements eclipse-cdt#1000, IDE-82683-REQ-012 CMake generator default
- Loading branch information
1 parent
1abb990
commit 50f36a3
Showing
16 changed files
with
190 additions
and
66 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...pse.cdt.cmake.core.tests/src/org/eclipse/cdt/cmake/core/CMakeBuildConfigurationTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.eclipse.cdt.cmake.core; | ||
|
||
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties; | ||
import org.eclipse.core.resources.IBuildConfiguration; | ||
import org.eclipse.core.runtime.CoreException; | ||
import org.junit.Test; | ||
|
||
public class CMakeBuildConfigurationTests { | ||
|
||
/** | ||
* TODO: TBC | ||
*/ | ||
@Test | ||
public void getDefaultCMakeProperties00() { | ||
|
||
org.eclipse.cdt.cmake.core.properties.CMakePropertiesFactory.createProperties(); | ||
|
||
} | ||
|
||
private class CMakeBuildConfigurationExtended extends CMakeBuildConfiguration { | ||
|
||
public CMakeBuildConfigurationExtended(IBuildConfiguration config, String name) throws CoreException { | ||
super(config, name); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
@Override | ||
public ICMakeProperties getCMakeProperties() { | ||
// get the built-in CDT defaults | ||
ICMakeProperties properties = super.getCMakeProperties(); | ||
|
||
// provide my customizations (I don't know what Renesas/extenders may actually want to do here) | ||
properties.setWarnUnitialized(true); | ||
return properties; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...e/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/ICMakeBuildConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2025 Renesas Electronics Europe. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package org.eclipse.cdt.cmake.core; | ||
|
||
import org.eclipse.cdt.cmake.core.properties.ICMakeProperties; | ||
|
||
/** | ||
* @since 2.0 | ||
*/ | ||
public interface ICMakeBuildConfiguration { | ||
|
||
/** | ||
* Provides a set of default CMake properties. The ICMakeProperties can then, for | ||
* example, provide a default value for the CMake generator. | ||
* @return A ICMakeProperties object containing default values. Must not be null. | ||
*/ | ||
ICMakeProperties getCMakeProperties(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/properties/CMakePropertiesFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2025 Renesas Electronics Europe. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
package org.eclipse.cdt.cmake.core.properties; | ||
|
||
import org.eclipse.cdt.cmake.core.internal.properties.CMakePropertiesBean; | ||
|
||
/** | ||
* @since 2.0 | ||
*/ | ||
public class CMakePropertiesFactory { | ||
public static ICMakeProperties createProperties() { | ||
return new CMakePropertiesBean(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.