common.props 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ImportGroup Label="PropertySheets">
  4. <Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
  5. </ImportGroup>
  6. <PropertyGroup Label="UserMacros" />
  7. <PropertyGroup>
  8. <OutDir>$(PyOutDir)</OutDir>
  9. <IntDir>$(PyIntDir)</IntDir>
  10. <PyFileCopyCookie>$(PyBuildDir)copycookie$(Configuration)$(Platform)</PyFileCopyCookie>
  11. </PropertyGroup>
  12. <ItemDefinitionGroup>
  13. <ClCompile>
  14. <AdditionalIncludeDirectories>$(PyIncDirs);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
  15. <PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  16. <SDLCheck>false</SDLCheck>
  17. <WarningLevel>Level1</WarningLevel>
  18. <ExceptionHandling>false</ExceptionHandling>
  19. <MultiProcessorCompilation>true</MultiProcessorCompilation>
  20. <MinimalRebuild>false</MinimalRebuild>
  21. </ClCompile>
  22. <Link>
  23. <GenerateDebugInformation>true</GenerateDebugInformation>
  24. <GenerateMapFile>true</GenerateMapFile>
  25. </Link>
  26. </ItemDefinitionGroup>
  27. <ItemGroup>
  28. <PyOutputFiles Include="$(TargetPath)">
  29. <Destination>$(PyWinDir)%(FileName)%(Extension)</Destination>
  30. </PyOutputFiles>
  31. <PyCookieFiles Include="$(PyBuildDir)copycookie*" Exclude="$(PyFileCopyCookie)"/>
  32. </ItemGroup>
  33. <!-- Copy PyOutputFiles to their target destination.
  34. To force this when switching between platforms/configurations which are already up-to-date (and as such,
  35. for which a build wouldn't even start because all outputs are effectively newer than the inputs)
  36. an empty file $(PyFileCopyCookie) is created serving as a record to indicate what was last copied,
  37. and any previous records are deleted. So when switching between builds which are otherwise up-to-date
  38. the tracker will notice a missing file and a build is started anyway (and it will just copy our files). -->
  39. <Target Name="CopyFilesToWinDir" AfterTargets="Build"
  40. Inputs="$(TargetPath)" Outputs="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')">
  41. <Delete Files="@(PyCookieFiles)"/>
  42. <Touch Files="$(PyFileCopyCookie)" AlwaysCreate="true"/>
  43. <Copy SourceFiles="%(PyOutputFiles.Identity)" DestinationFiles="%(PyOutputFiles.Destination)"/>
  44. <WriteLinesToFile File="$(TLogLocation)$(ProjectName).write.u.tlog" Lines="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')" Overwrite="True"/>
  45. </Target>
  46. </Project>