|
| 1 | +--- |
| 2 | +title: "C/C++ Properties (Linux C++) | Microsoft Docs" |
| 3 | +ms.custom: "" |
| 4 | +ms.date: "9/26/2017" |
| 5 | +ms.reviewer: "" |
| 6 | +ms.suite: "" |
| 7 | +ms.technology: |
| 8 | + - "vs-ide-general" |
| 9 | +ms.tgt_pltfrm: "" |
| 10 | +ms.topic: "article" |
| 11 | +ms.assetid: 4bb8894b-c874-4a68-935e-b127d54e484f |
| 12 | +author: "mikeblome" |
| 13 | +ms.author: "mblome" |
| 14 | +manager: "ghogen" |
| 15 | +f1_keywords: |
| 16 | + - VC.Project.VCClangCompilerTool.AdditionalIncludeDirectories |
| 17 | + - VC.Project.VCClangCompilerTool.DebugInformationFormat |
| 18 | + - VC.Project.VCClangCompilerTool.ObjectFile |
| 19 | + - VC.Project.VCClangCompilerTool.WarningLevel |
| 20 | + - VC.Project.VCClangCompilerTool.WarnAsError |
| 21 | + - VC.Project.VCClangCompilerTool.AdditionalWarning |
| 22 | + - VC.Project.VCClangCompilerTool.Verbose |
| 23 | + - VC.Project.VCConfiguration.BuildLogFile |
| 24 | + - VC.Project.VCClangCompilerTool.Optimization |
| 25 | + - VC.Project.VCClangCompilerTool.StrictAliasing |
| 26 | + - VC.Project.VCClangCompilerTool.UnrollLoops |
| 27 | + - VC.Project.VCClangCompilerTool.LinkTimeOptimization |
| 28 | + - VC.Project.VCClangCompilerTool.OmitFramePointers |
| 29 | + - VC.Project.VCClangCompilerTool.NoCommonBlocks |
| 30 | + - VC.Project.VCClangCompilerTool.PIC |
| 31 | + - VC.Project.VCClangCompilerTool.ThreadSafeStatics |
| 32 | + - VC.Project.VCClangCompilerTool.RelaxIEEE |
| 33 | + - VC.Project.VCClangCompilerTool.HideInlineMethods |
| 34 | + - VC.Project.VCClangCompilerTool.SymbolsHiddenByDefault |
| 35 | + - VC.Project.VCClangCompilerTool.ExceptionHandling |
| 36 | + - VC.Project.VCClangCompilerTool.RuntimeTypeInfo |
| 37 | + - VC.Project.VCClangCompilerTool.CLanguageStandard |
| 38 | + - VC.Project.VCClangCompilerTool.CppLanguageStandard |
| 39 | + - VC.Project.VCClangCompilerTool.PreprocessorDefinitions |
| 40 | + - VC.Project.VCClangCompilerTool.UndefinePreprocessorDefinitions |
| 41 | + - VC.Project.VCClangCompilerTool.UndefineAllPreprocessorDefinitions |
| 42 | + - VC.Project.VCClangCompilerTool.ShowIncludes |
| 43 | + - VC.Project.VCClangCompilerTool.CompileAs |
| 44 | + - VC.Project.VCClangCompilerTool.ForcedIncludeFiles |
| 45 | + - vc.project.AdditionalOptionsPage |
| 46 | +--- |
| 47 | + |
| 48 | +# C/C++ Properties (Linux C++) |
| 49 | + |
| 50 | +## General |
| 51 | +Property | Description | Choices |
| 52 | +--- | ---| --- |
| 53 | +Additional Include Directories | Specifies one or more directories to add to the include path; separate with semi-colons if more than one. (-I[path]). |
| 54 | +Debug Information Format | Specifies the type of debugging information generated by the compiler. | **None** - Produces no debugging information, so compilation may be faster.<br>**Minimal Debug Information** - Generate minimal debug information.<br>**Full Debug Information (DWARF2)** - Generate DWARF2 debug information.<br> |
| 55 | +Object File Name | Specifies a name to override the default object file name; can be file or directory name. (-o [name]). |
| 56 | +Warning Level | Select how strict you want the compiler to be about code errors. Other flags should be added directly to Additional Options. (/w, /Weverything). | **Turn Off All Warnings** - Disables all compiler warnings.<br>**EnableAllWarnings** - Enables all warnings, including those disabled by default.<br> |
| 57 | +Treat Warnings As Errors | Treats all compiler warnings as errors. For a new project, it may be best to use /Werror in all compilations; resolving all warnings will ensure the fewest possible hard-to-find code defects. |
| 58 | +C Additional Warnings | Defines a set of additional warning messages. |
| 59 | +C++ Additional Warnings | Defines a set of additional warning messages. |
| 60 | +Enable Verbose mode | When Verbose mode is enabled, this tool would print out more information that for diagnosing the build. |
| 61 | +C Compiler | Specifies the program to invoke during compilation of C source files, or the path to the C compiler on the remote system. |
| 62 | +C++ Compiler | Specifies the program to invoke during compilation of C++ source files, or the path to the C++ compiler on the remote system. |
| 63 | +Compile Timeout | Remote compilation timeout, in milliseconds. |
| 64 | +Copy Object Files | Specifies whether to copy the compiled object files from the remote system to the local machine. |
| 65 | + |
| 66 | +## Optimization |
| 67 | +Property | Description | Choices |
| 68 | +--- | ---| --- |
| 69 | +Optimization | Specifies the optimization level for the application. | **Custom** - Custom optimization.<br>**Disabled** - Disable optimization.<br>**Minimize Size** - Optimize for size.<br>**Maximize Speed** - Optimize for speed.<br>**Full Optimization** - Expensive optimizations.<br> |
| 70 | +Strict Aliasing | Assume the strictest aliasing rules. An object of one type will never be assumed to reside at the same address as an object of a different type. |
| 71 | +Unroll Loops | Unroll loops to make application faster by reducing number of branches executed at the cost of larger code size. |
| 72 | +Link Time Optimization | Enable Inter-Procedural optimizations by allowing the optimizer to look across object files in your application. |
| 73 | +Omit Frame Pointer | Suppresses creation of frame pointers on the call stack. |
| 74 | +No Common Blocks | Allocate even unintialized global variables in the data section of the object file, rather then generating them as common blocks |
| 75 | + |
| 76 | +## Preprocessor |
| 77 | +Property | Description | Choices |
| 78 | +--- | ---| --- |
| 79 | +Preprocessor Definitions | Defines a preprocessing symbols for your source file. (-D) |
| 80 | +Undefine Preprocessor Definitions | Specifies one or more preprocessor undefines. (-U [macro]) |
| 81 | +Undefine All Preprocessor Definitions | Undefine all previously defined preprocessor values. (-undef) |
| 82 | +Show Includes | Generates a list of include files with compiler output. (-H) |
| 83 | + |
| 84 | +## Code Generation |
| 85 | +Property | Description | Choices |
| 86 | +--- | ---| --- |
| 87 | +Position Independent Code | Generate Position Independent Code (PIC) for use in a shared library. |
| 88 | +Statics are thread safe | Emit Extra code to use routines specified in C++ ABI for thread safe initilization of local statics. | **No** - Disable thread safe statics.<br>**Yes** - Enable thread safe statics.<br> |
| 89 | +Floating Point Optimization | Enables floating point optimizations by relaxing IEEE-754 compliance. |
| 90 | +Inline Methods Hidden | When enabled, out-of-line copies of inline methods are declared 'private extern'. |
| 91 | +Symbol Hiddens By Default | All symbols are declared 'private extern' unless explicitly marked to be exported using the '__attribute' macro. |
| 92 | +Enable C++ Exceptions | Specifies the model of exception handling to be used by the compiler. | **No** - Disable exception handling.<br>**Yes** - Enable exception handling.<br> |
| 93 | + |
| 94 | +## Language |
| 95 | +Property | Description | Choices |
| 96 | +--- | ---| --- |
| 97 | +Enable Run-Time Type Information | Adds code for checking C++ object types at run time (runtime type information). (frtti, fno-rtti) |
| 98 | +C Language Standard | Determines the C language standard. | **Default**<br>**C89** - C89 Language Standard.<br>**C99** - C99 Language Standard.<br>**C11** - C11 Language Standard.<br>**C99 (GNU Dialect)** - C99 (GNU Dialect) Language Standard.<br>**C11 (GNU Dialect)** - C11 (GNU Dialect) Language Standard.<br> |
| 99 | +C++ Language Standard | Determines the C++ language standard. | **Default**<br>**C++03** - C++03 Language Standard.<br>**C++11** - C++11 Language Standard.<br>**C++14** - C++14 Language Standard.<br>**C++03 (GNU Dialect)** - C++03 (GNU Dialect) Language Standard.<br>**C++11 (GNU Dialect)** - C++11 (GNU Dialect) Language Standard.<br>**C++14 (GNU Dialect)** - C++14 (GNU Dialect) Language Standard.<br> |
| 100 | + |
| 101 | +## Advanced |
| 102 | +Property | Description | Choices |
| 103 | +--- | ---| --- |
| 104 | +Compile As | Select compile language option for .c and .cpp files. 'Default' will detect based on .c or .cpp extention. (-x c, -x c++) | **Default** - Default.<br>**Compile as C Code** - Compile as C Code.<br>**Compile as C++ Code** - Compile as C++ Code.<br> |
| 105 | +Forced Include Files | One or more forced include files (-include [name]) |
| 106 | + |
| 107 | +## Additional Options |
0 commit comments