diff options
author | David Benjamin <davidben@google.com> | 2018-06-29 19:54:42 (GMT) |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2018-07-02 22:50:12 (GMT) |
commit | cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6 (patch) | |
tree | 1864e4af430fe5f2b33beb0adad881430ba28cdb /Templates | |
parent | 9539985fb215439d3d379f60a381e6102ac49e4b (diff) | |
download | CMake-cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6.zip CMake-cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6.tar.gz CMake-cb694f8cd65dfb4e73fedcfa04f92c8be7a2bcf6.tar.bz2 |
VS: Properly quote arguments in nasm.xml
Most arguments were quoted, but some weren't, causing problems if the
arguments contained whitespace.
In particular, the _STL_EXTRA_DISABLED_WARNINGS value takes spaces and
CMake's NASM support applies all add_definitions lines to NASM. The -D
flag is missing quotes, so projects using NASM and setting
_STL_EXTRA_DISABLED_WARNINGS break in the Visual Studio generator.
Likewise, the -o flag is missing quotes, which means filenames with
spaces do not work.
(The -U flag is unlikely to need quotes, but include them for
consistency.)
Extend the existing VSNASM test to cover these cases.
Diffstat (limited to 'Templates')
-rw-r--r-- | Templates/MSBuild/nasm.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Templates/MSBuild/nasm.xml b/Templates/MSBuild/nasm.xml index 92f8548..a5dcdd5 100644 --- a/Templates/MSBuild/nasm.xml +++ b/Templates/MSBuild/nasm.xml @@ -36,7 +36,7 @@ <DataSource Persistence="ProjectFile" ItemType="NASM" SourceType="Item"/> </StringProperty.DataSource> </StringProperty> - <StringProperty Name="OutputFormat" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output File Name" Description="Specify Output Filename.-o [value]" Switch="-o [value]"/> + <StringProperty Name="OutputFormat" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output File Name" Description="Specify Output Filename.-o [value]" Switch="-o "[value]""/> <BoolProperty Name="tasmmode" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="SciTech TASM compatible mode" Description="assemble in SciTech TASM compatible mode" Switch="-t"/> <EnumProperty Name="Outputswitch" Category="Assembler Options" HelpUrl="http://www.nasm.us/doc/" DisplayName="Output Switch" Description="Select the type of output format required. Linking Should be disabled for ELF and Binary ,else error will popup"> <EnumValue Name="0" DisplayName="Object File win32" Switch="-fwin32"/> @@ -48,8 +48,8 @@ <BoolProperty Name="GenerateDebugInformation" Category="Assembler Options" DisplayName="Generate Debug Information" Description="Generates Debug Information. (-g)" HelpUrl="http://www.nasm.us/doc/" Switch="-g"/> <StringListProperty Name="ErrorReporting" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="Redirect Error Messages to File" Description="Drops the error Message on specified device" Switch="-Z "[value]""/> <StringListProperty Name="IncludePaths" Category="General" DisplayName="Include Paths" Description="Sets path for include file. (-I[path])" HelpUrl="http://www.nasm.us/doc/" Switch="-I"[value]""/> - <StringListProperty Name="PreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Preprocessor Definitions" Description="Defines a text macro with the given name. (-D[symbol])" Switch="-D[value]"/> - <StringListProperty Name="UndefinePreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Undefine Preprocessor Definitions" Description="Undefines a text macro with the given name. (-U[symbol])" Switch="-U[value]"/> + <StringListProperty Name="PreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Preprocessor Definitions" Description="Defines a text macro with the given name. (-D[symbol])" Switch="-D"[value]""/> + <StringListProperty Name="UndefinePreprocessorDefinitions" Category="Preprocessor" HelpUrl="http://www.nasm.us/doc/" DisplayName="Undefine Preprocessor Definitions" Description="Undefines a text macro with the given name. (-U[symbol])" Switch="-U"[value]""/> <EnumProperty Name="ErrorReportingFormat" Category="Advanced" HelpUrl="http://www.nasm.us/doc/" DisplayName="Error Reporting Format" Description="Select the error reporting format ie. GNU or VC"> <EnumValue Name="0" DisplayName="-Xgnu GNU format: Default format" Switch="-Xgnu"/> <EnumValue Name="1" DisplayName="-Xvc Style used by Microsoft Visual C++" Switch="-Xvc"/> |