Add first draft version of upmake, tool for updating makefiles.
Start moving away from files.bkl as the primary source for the files -- and away from bakefile itself as the make/project file generator -- by storing the list of files in a new build/files file and provide a simple build/upmake script for updating files.bkl and the manually maintained MSVC10+ projects from this file contents. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
50
build/tools/upmake/t/03_update_msbuild.t
Normal file
50
build/tools/upmake/t/03_update_msbuild.t
Normal file
@@ -0,0 +1,50 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use autodie;
|
||||
use Test::More;
|
||||
|
||||
use Text::Upmake;
|
||||
BEGIN { use_ok('Text::Upmake::MSBuild'); }
|
||||
|
||||
my $sources = [qw(file1.cpp file2.cpp fileNew.cpp)];
|
||||
my $headers = [qw(file1.h file2.h fileNew.h)];
|
||||
|
||||
open my $out, '>', \my $outstr;
|
||||
update_msbuild(*DATA, $out, $sources, $headers);
|
||||
|
||||
note("Result: $outstr");
|
||||
|
||||
like($outstr, qr/file1\.cpp/, 'existing source file was preserved');
|
||||
like($outstr, qr/fileNew\.cpp/m, 'new source file was added');
|
||||
unlike($outstr, qr/fileOld\.cpp/, 'old source file was removed');
|
||||
unlike($outstr, qr/file3\.h/, 'old header was removed');
|
||||
like($outstr, qr/fileNew\.h/, 'new header was added');
|
||||
|
||||
done_testing()
|
||||
|
||||
__DATA__
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="file1.cpp" />
|
||||
<ClCompile Include="file2.cpp" />
|
||||
<ClCompile Include="fileOld.cpp" />
|
||||
<ClCompile Include="file3.cpp" >
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DLL Debug|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="file1.h" />
|
||||
<ClInclude Include="file2.h" />
|
||||
<ClInclude Include="file3.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user