@@ -102,7 +102,7 @@ private void SetPlatform()
102102 {
103103 if ( match . Groups [ 1 ] . Value . Trim ( ) == "Windows" )
104104 {
105- _os = "Windows_NT " ;
105+ _os = "Windows " ;
106106 }
107107 else if ( match . Groups [ 1 ] . Value . Trim ( ) == "Darwin" )
108108 {
@@ -158,11 +158,6 @@ private void validate()
158158 }
159159 }
160160
161- if ( _os == "Windows" )
162- {
163- _os = "Windows_NT" ;
164- }
165-
166161 if ( _srcDirectory == null )
167162 {
168163 if ( _verbose )
@@ -212,12 +207,12 @@ private void validate()
212207 }
213208
214209 // Check that we can find compile_commands.json on windows
215- if ( _os == "Windows_NT " )
210+ if ( _os . ToLower ( ) == "windows " )
216211 {
217212 // If the user didn't specify a compile_commands.json, we need to see if one exists, and if not, create it.
218213 if ( ! _untidy && _compileCommands == null )
219214 {
220- string [ ] compileCommandsPath = { _rootPath , ".." , ".." , "artifacts" , "nmakeobj" , "Windows_NT ." + _arch + "." + _build , "compile_commands.json" } ;
215+ string [ ] compileCommandsPath = { _rootPath , ".." , ".." , "artifacts" , "nmakeobj" , _os + " ." + _arch + "." + _build , "compile_commands.json" } ;
221216 _compileCommands = Path . Combine ( compileCommandsPath ) ;
222217 _rewriteCompileCommands = true ;
223218
@@ -368,7 +363,7 @@ public T ExtractDefault<T>(string name, out bool found)
368363 return default ( T ) ;
369364 }
370365
371- public bool IsWindows { get { return ( _os == "Windows_NT " ) ; } }
366+ public bool IsWindows { get { return ( _os . ToLower ( ) == "windows " ) ; } }
372367 public bool DoVerboseOutput { get { return _verbose ; } }
373368 public bool DoClangTidy { get { return ! _untidy ; } }
374369 public bool DoClangFormat { get { return ! _noformat ; } }
0 commit comments