mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 404913: Dialect category and options for language standards for GCC toolchain
This commit is contained in:
parent
12c5f12990
commit
e84409b1f0
5 changed files with 98 additions and 6 deletions
|
@ -609,7 +609,7 @@
|
|||
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector"
|
||||
id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
|
||||
name="%GCCBuildinCompilerSettings.name"
|
||||
parameter="${COMMAND} -E -P -v -dD "${INPUTS}"">
|
||||
parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -617,7 +617,7 @@
|
|||
class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorCygwin"
|
||||
id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin"
|
||||
name="CDT GCC Builtin Compiler Settings Cygwin"
|
||||
parameter="${COMMAND} -E -P -v -dD "${INPUTS}"">
|
||||
parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
@ -625,7 +625,7 @@
|
|||
class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW"
|
||||
id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW"
|
||||
name="%GCCBuildinCompilerSettingsMinGW.name"
|
||||
parameter="${COMMAND} -E -P -v -dD "${INPUTS}"">
|
||||
parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -99,6 +99,7 @@ ToolName.compiler.solaris.cpp = Solaris C++ Compiler
|
|||
|
||||
# Generic Category Names
|
||||
OptionCategory.Symbols = Symbols
|
||||
OptionCategory.Dialect = Dialect
|
||||
OptionCategory.Preproc = Preprocessor
|
||||
OptionCategory.Dirs = Includes
|
||||
OptionCategory.General = General
|
||||
|
@ -110,6 +111,16 @@ OptionCategory.Libs=Libraries
|
|||
OptionCategory.Shared.Settings=Shared Library Settings
|
||||
|
||||
# Generic Option Names
|
||||
Option.Posix.Dialect=Language standard
|
||||
Option.Posix.Dialect.default=
|
||||
Option.Posix.Dialect.c90=ISO C90 / ANSI C89 (-std=c90)
|
||||
Option.Posix.Dialect.c99=ISO C99 (-std=c99)
|
||||
Option.Posix.Dialect.c11=ISO C11 (-std=c11)
|
||||
Option.Posix.Dialect.c++98=ISO C++98 (-std=c++98)
|
||||
Option.Posix.Dialect.c++11=ISO C++11 (-std=c++0x)
|
||||
Option.Posix.Dialect.c++1y=ISO C++1y (-std=c++1y)
|
||||
Option.Posix.Dialect.Flags=Other dialect flags
|
||||
|
||||
Option.Posix.PreprocOnly=Preprocess only (-E)
|
||||
Option.Posix.Nostdinc=Do not search system directories (-nostdinc)
|
||||
|
||||
|
|
|
@ -959,6 +959,46 @@
|
|||
pathType="buildpathInclude"
|
||||
variableList="CPATH,C_INCLUDE_PATH">
|
||||
</envVarBuildPath>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.c.compiler"
|
||||
name="%OptionCategory.Dialect"
|
||||
id="gnu.c.compiler.category.dialect">
|
||||
</optionCategory>
|
||||
<option
|
||||
category="gnu.c.compiler.category.dialect"
|
||||
defaultValue="false"
|
||||
id="gnu.c.compiler.option.dialect.std"
|
||||
name="%Option.Posix.Dialect"
|
||||
useByScannerDiscovery="true"
|
||||
valueType="enumerated">
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.default"
|
||||
command=""
|
||||
id="gnu.c.compiler.dialect.default">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c90"
|
||||
command="-std=c90"
|
||||
id="gnu.c.compiler.dialect.c90">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c99"
|
||||
command="-std=c99"
|
||||
id="gnu.c.compiler.dialect.c99">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c11"
|
||||
command="-std=c11"
|
||||
id="gnu.c.compiler.dialect.c11">
|
||||
</enumeratedOptionValue>
|
||||
</option>
|
||||
<option
|
||||
name="%Option.Posix.Dialect.Flags"
|
||||
category="gnu.c.compiler.category.dialect"
|
||||
id="gnu.c.compiler.option.dialect.flags"
|
||||
useByScannerDiscovery="true"
|
||||
valueType="string">
|
||||
</option>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.c.compiler"
|
||||
name="%OptionCategory.Preproc"
|
||||
|
@ -1295,6 +1335,46 @@
|
|||
pathType="buildpathInclude"
|
||||
variableList="CPATH,CPLUS_INCLUDE_PATH">
|
||||
</envVarBuildPath>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.cpp.compiler"
|
||||
name="%OptionCategory.Dialect"
|
||||
id="gnu.cpp.compiler.category.dialect">
|
||||
</optionCategory>
|
||||
<option
|
||||
category="gnu.cpp.compiler.category.dialect"
|
||||
defaultValue="false"
|
||||
id="gnu.cpp.compiler.option.dialect.std"
|
||||
name="%Option.Posix.Dialect"
|
||||
useByScannerDiscovery="true"
|
||||
valueType="enumerated">
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.default"
|
||||
command=""
|
||||
id="gnu.cpp.compiler.dialect.default">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c++98"
|
||||
command="-std=c++98"
|
||||
id="gnu.cpp.compiler.dialect.c++98">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c++11"
|
||||
command="-std=c++0x"
|
||||
id="gnu.cpp.compiler.dialect.c++11">
|
||||
</enumeratedOptionValue>
|
||||
<enumeratedOptionValue
|
||||
name="%Option.Posix.Dialect.c++1y"
|
||||
command="-std=c++1y"
|
||||
id="gnu.cpp.compiler.dialect.c++1y">
|
||||
</enumeratedOptionValue>
|
||||
</option>
|
||||
<option
|
||||
name="%Option.Posix.Dialect.Flags"
|
||||
category="gnu.cpp.compiler.category.dialect"
|
||||
id="gnu.cpp.compiler.option.dialect.flags"
|
||||
useByScannerDiscovery="true"
|
||||
valueType="string">
|
||||
</option>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.cpp.compiler"
|
||||
name="%OptionCategory.Preproc"
|
||||
|
|
|
@ -181,9 +181,10 @@ Language settings providers can have options that affect the behavior of a provi
|
|||
<td headers="description2">The command to make the compiler print built-in settings.
|
||||
Following variables are recognized:
|
||||
<ul>
|
||||
<li><strong>${COMMAND}</strong> - compiler command from the toolchain, such as "gcc".</li>
|
||||
<li><strong>${COMMAND}</strong> - compiler command from the tool-chain, such as "gcc".</li>
|
||||
<li><strong>${FLAGS}</strong> - applicable compiler flags from the tool-chain, such as language dialect flag "-std=c++0x".</li>
|
||||
<li><strong>${INPUTS}</strong> - indicates normally an empty specs file required by the compiler.
|
||||
In no such file exists the file gets created temporarily in Eclipse workspace plugin area.
|
||||
If no such file exists the file gets created temporarily in Eclipse workspace plugin area.
|
||||
</li>
|
||||
<li><strong>${EXT}</strong> - an extension for the language to discover built-in settings.
|
||||
A provider can be associated with multiple languages and it will run the command for each language.
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
class="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
id="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuiltinSpecsDetector"
|
||||
name="%XlcBuiltinSpecsDetectorName"
|
||||
parameter="${COMMAND} -E -V -P -w "${INPUTS}"">
|
||||
parameter="${COMMAND} ${FLAGS} -E -V -P -w "${INPUTS}"">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
Loading…
Add table
Reference in a new issue