|
256 | 256 | prepare() |
257 | 257 | test.capture [[ |
258 | 258 | <ItemGroup> |
259 | | - <None Include="hello.cpp" /> |
| 259 | + <ClCompile Include="hello.cpp"> |
| 260 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
| 261 | + </ClCompile> |
260 | 262 | </ItemGroup> |
261 | 263 | ]] |
262 | 264 | end |
|
273 | 275 | ]] |
274 | 276 | end |
275 | 277 |
|
276 | | - function suite.excludedFromBuild_onBuildActionNone_Filtered() |
| 278 | + function suite.excludedFromBuild_onAPI() |
277 | 279 | files { "hello.cpp" } |
278 | | - filter { "files:hello.cpp", "configurations:Debug" } |
279 | | - buildaction "None" |
| 280 | + filter "files:hello.cpp" |
| 281 | + excludefrombuild "On" |
280 | 282 | prepare() |
281 | 283 | test.capture [[ |
282 | 284 | <ItemGroup> |
283 | 285 | <ClCompile Include="hello.cpp"> |
284 | | - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> |
| 286 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
285 | 287 | </ClCompile> |
286 | 288 | </ItemGroup> |
287 | 289 | ]] |
288 | 290 | end |
289 | 291 |
|
| 292 | + |
290 | 293 | function suite.excludedFromBuild_onResourceFile_excludedFile() |
291 | 294 | files { "hello.rc" } |
292 | 295 | filter "Debug" |
|
308 | 311 | prepare() |
309 | 312 | test.capture [[ |
310 | 313 | <ItemGroup> |
311 | | - <None Include="hello.rc" /> |
| 314 | + <ResourceCompile Include="hello.rc"> |
| 315 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
| 316 | + </ResourceCompile> |
312 | 317 | </ItemGroup> |
313 | 318 | ]] |
314 | 319 | end |
|
325 | 330 | ]] |
326 | 331 | end |
327 | 332 |
|
328 | | - function suite.excludedFromBuild_onResourceFile_buildActionNone_Filtered() |
| 333 | + function suite.excludedFromBuild_onResourceFile_viaAPI() |
329 | 334 | files { "hello.rc" } |
330 | | - filter { "files:hello.rc", "configurations:Debug" } |
331 | | - buildaction "None" |
| 335 | + filter "files:hello.rc" |
| 336 | + excludefrombuild "On" |
332 | 337 | prepare() |
333 | 338 | test.capture [[ |
334 | 339 | <ItemGroup> |
335 | 340 | <ResourceCompile Include="hello.rc"> |
336 | | - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> |
| 341 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
337 | 342 | </ResourceCompile> |
338 | 343 | </ItemGroup> |
339 | 344 | ]] |
|
347 | 352 | prepare() |
348 | 353 | test.capture [[ |
349 | 354 | <ItemGroup> |
350 | | - <None Include="hello.rc" /> |
| 355 | + <ResourceCompile Include="hello.rc"> |
| 356 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
| 357 | + </ResourceCompile> |
351 | 358 | </ItemGroup> |
352 | 359 | ]] |
353 | 360 | end |
354 | 361 |
|
355 | | - function suite.excludedFromBuild_onResourceFile_buildActionNone_nonWindows() |
| 362 | + function suite.excludedFromBuild_onResourceFile_viaAPI_nonWindows() |
356 | 363 | files { "hello.rc" } |
357 | 364 | system "Linux" |
358 | 365 | filter "files:hello.rc" |
359 | | - buildaction "None" |
360 | | - prepare() |
361 | | - test.capture [[ |
362 | | -<ItemGroup> |
363 | | - <None Include="hello.rc" /> |
364 | | -</ItemGroup> |
365 | | - ]] |
366 | | - end |
367 | | - |
368 | | - function suite.excludedFromBuild_onResourceFile_buildActionNone_nonWindows_Filtered() |
369 | | - files { "hello.rc" } |
370 | | - system "Linux" |
371 | | - filter { "files:hello.rc", "configurations:Debug" } |
372 | | - buildaction "None" |
| 366 | + excludefrombuild "On" |
373 | 367 | prepare() |
374 | 368 | test.capture [[ |
375 | 369 | <ItemGroup> |
376 | 370 | <ResourceCompile Include="hello.rc"> |
377 | | - <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">true</ExcludedFromBuild> |
| 371 | + <ExcludedFromBuild>true</ExcludedFromBuild> |
378 | 372 | </ResourceCompile> |
379 | 373 | </ItemGroup> |
380 | 374 | ]] |
|
429 | 423 | ]] |
430 | 424 | end |
431 | 425 |
|
432 | | - function suite.excludedFromBuild_onCustomBuildRule_buildActionNone() |
433 | | - files { "hello.cg" } |
434 | | - filter "files:**.cg" |
435 | | - buildcommands { "cgc $(InputFile)" } |
436 | | - buildoutputs { "$(InputName).obj" } |
437 | | - buildaction "None" |
438 | | - prepare() |
439 | | - test.capture [[ |
440 | | -<ItemGroup> |
441 | | - <CustomBuild Include="hello.cg"> |
442 | | - <FileType>Document</FileType> |
443 | | - <ExcludedFromBuild>true</ExcludedFromBuild> |
444 | | - <Command>cgc $(InputFile)</Command> |
445 | | - <Outputs>$(InputName).obj</Outputs> |
446 | | - </CustomBuild> |
447 | | -</ItemGroup> |
448 | | - ]] |
449 | | - end |
450 | | - |
451 | 426 | function suite.excludedFromBuild_onCustomBuildRule_withNoCommands_excludeViaFlag() |
452 | 427 | files { "hello.cg" } |
453 | 428 | filter { "files:**.cg", "Debug" } |
|
468 | 443 | ]] |
469 | 444 | end |
470 | 445 |
|
471 | | - function suite.excludedFromBuild_onCustomBuildRule_withNoCommands_buildActionNone() |
| 446 | + function suite.excludedFromBuild_onCustomBuildRule_withNoCommands_excludeViaAPI() |
472 | 447 | files { "hello.cg" } |
473 | 448 | filter { "files:**.cg", "Debug" } |
474 | 449 | buildcommands { "cgc $(InputFile)" } |
475 | 450 | buildoutputs { "$(InputName).obj" } |
476 | 451 | filter { "files:**.cg" } |
477 | | - buildaction "None" |
| 452 | + excludefrombuild "On" |
478 | 453 | prepare() |
479 | 454 | test.capture [[ |
480 | 455 | <ItemGroup> |
|
0 commit comments