Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] check for Cygwin toolchain under CDT 4.0

Hi Nils,

All cygwin tool-chain definition in the 4.0 are based upon the toolchain
of id "cdt.managedbuild.toolchain.gnu.cygwin.base", so to check whether
the tool-chain is a cygwin one you can check whether one of its
superclasses has this ID

Mikhail

-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
On Behalf Of Hagge, Nils
Sent: Friday, May 11, 2007 1:00 PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] check for Cygwin toolchain under CDT 4.0

Hello! 

In order to find out, if the build is based on the cygwin toolchain, I
use the following code snippet:

-----
IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);

org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo mbi =
 
org.eclipse.cdt.managedbuilder.core.ManagedBuildManager.getBuildInfo(pro
ject);

String s = mbi.getManagedProject().getBaseId();
boolean isCygwin = s.contains("cygwin");
-----

Is there a better way to do that under CDT 4.0.0?

Regards,
Nils
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top