Skip to main content
summaryrefslogtreecommitdiffstats
blob: 272caf0579a68121698758ab605e125bb87fd64a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>

   <!-- -->
   <!-- Xl C ScannerConfigurationDiscoveryProfile definitions -->
   <!-- -->

   <!-- We have to extend the core of CDT's make so that we can define a new ScannerConfigurationDiscoveryProfile -->
   <!-- A ScannerConfigurationDiscoveryProfile is used to discover information about the standard options used by the compiler, e.g. the standard include directories -->

   <!-- Xl C Managed Make Per Project Profile -->
   <!-- The Profile gathers together information about the standard include directories and standard definitions used by the compiler -->
   <extension
         id="XLCManagedMakePerProjectProfile"
         name="%profileName"
         point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">

      <!-- The ScannerInfoCollector manages the information generated by the Profile so that it can be easily accessed afterwards -->
      <scannerInfoCollector
            class="org.eclipse.cdt.make.xlc.core.scannerconfig.PerFileXLCScannerInfoCollector"
            scope="project">
      </scannerInfoCollector>

      <!-- The ScannerInfoProvider search for the information needed by the profile and send it to the ScannerInfoCollector -->
      <scannerInfoProvider providerId="specsFile">
         <!-- Specifies the compiler command that returns the information about standard include directories and standard definitions -->
         <!-- The compiler command used will be always a C compiler command -->
         <!-- The output for C or C++ projects will be different as the ScannerInfoProvider substitute the ${specs_file} variable below with a dummy "c" file or "cpp" file -->
         <run
               arguments="-E -v &quot;${plugin_state_location}/${specs_file}&quot;"
               command="${XL_compilerRoot}/xlc"
               class="org.eclipse.cdt.make.xlc.core.scannerconfig.XlCSpecsRunSIProvider">
         </run>
         <!-- Specifies the parser for the output generated by the compiler with the above command line -->
         <scannerInfoConsoleParser
               class="org.eclipse.cdt.make.xlc.core.scannerconfig.XlCSpecsConsoleParser">
         </scannerInfoConsoleParser>
      </scannerInfoProvider>

   </extension>
   <!-- -->
   <!-- Xl C ScannerConfigurationDiscoveryProfile definitions -->
   <!-- -->

   <!-- We have to extend the core of CDT's make so that we can define a new ScannerConfigurationDiscoveryProfile -->
   <!-- A ScannerConfigurationDiscoveryProfile is used to discover information about the standard options used by the compiler, e.g. the standard include directories -->

   <!-- Xl C Managed Make Per Project Profile -->
   <!-- The Profile gathers together information about the standard include directories and standard definitions used by the compiler -->
   <extension
         id="XLCManagedMakePerProjectProfileCPP"
         name="%profileNameCPP"
         point="org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile">

      <!-- The ScannerInfoCollector manages the information generated by the Profile so that it can be easily accessed afterwards -->
      <scannerInfoCollector
            class="org.eclipse.cdt.make.xlc.core.scannerconfig.PerFileXLCScannerInfoCollector"
            scope="project">
      </scannerInfoCollector>

      <!-- The ScannerInfoProvider search for the information needed by the profile and send it to the ScannerInfoCollector -->
      <scannerInfoProvider providerId="specsFile">
         <!-- Specifies the compiler command that returns the information about standard include directories and standard definitions -->
         <!-- The compiler command used will be always a C compiler command -->
         <!-- The output for C or C++ projects will be different as the ScannerInfoProvider substitute the ${specs_file} variable below with a dummy "c" file or "cpp" file -->
         <run
               arguments="-E -v &quot;${plugin_state_location}/${specs_file}&quot;"
               command="${XL_compilerRoot}/xlC"
               class="org.eclipse.cdt.make.xlc.core.scannerconfig.XlCSpecsRunSIProvider">
         </run>
         <!-- Specifies the parser for the output generated by the compiler with the above command line -->
         <scannerInfoConsoleParser
               class="org.eclipse.cdt.make.xlc.core.scannerconfig.XlCSpecsConsoleParser">
         </scannerInfoConsoleParser>
      </scannerInfoProvider>
   </extension>

   <extension
         point="org.eclipse.cdt.core.LanguageSettingsProvider">
      <provider
            class="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
            id="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
            name="%XlcBuiltinSpecsDetectorName"
            parameter="${COMMAND} ${FLAGS} -E -V -P -w &quot;${INPUTS}&quot;">
         <language-scope id="org.eclipse.cdt.core.gcc"/>
         <language-scope id="org.eclipse.cdt.core.g++"/>
      </provider>
      <provider
            class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
            id="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
            name="%XlcBuildCommandParserName"
            parameter="xl[cC]"
            prefer-non-shared="true">
      </provider>
   </extension>

</plugin>

Back to the top