summaryrefslogtreecommitdiffstatshomepage
path: root/windows/msvc/common.props
blob: cfb6adbc14b68c4485b000d61d2f67f85a57d7bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets">
    <Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <OutDir>$(PyOutDir)</OutDir>
    <IntDir>$(PyIntDir)</IntDir>
    <PyFileCopyCookie>$(PyBuildDir)copycookie$(Configuration)$(Platform)</PyFileCopyCookie>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalIncludeDirectories>$(PyIncDirs);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>_USE_MATH_DEFINES;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <SDLCheck>false</SDLCheck>
      <WarningLevel>Level1</WarningLevel>
      <ExceptionHandling>false</ExceptionHandling>
    </ClCompile>
    <Link>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <GenerateMapFile>true</GenerateMapFile>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup>
    <PyOutputFiles Include="$(TargetPath)">
      <Destination>$(PyWinDir)%(FileName)%(Extension)</Destination>
    </PyOutputFiles>
    <PyCookieFiles Include="$(PyBuildDir)copycookie*" Exclude="$(PyFileCopyCookie)"/>
  </ItemGroup>

  <!-- Copy PyOutputFiles to their target destination.
       To force this when switching between platforms/configurations which are already up-to-date (and as such,
       for which a build wouldn't even start because all outputs are effectively newer than the inputs)
       an empty file $(PyFileCopyCookie) is created serving as a record to indicate what was last copied,
       and any previous records are deleted. So when switching between builds which are otherwise up-to-date
       the tracker will notice a missing file and a build is started anyway (and it will just copy our files). -->
  <Target Name="CopyFilesToWinDir" AfterTargets="Build"
          Inputs="$(TargetPath)" Outputs="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')">
    <Delete Files="@(PyCookieFiles)"/>
    <Touch Files="$(PyFileCopyCookie)" AlwaysCreate="true"/>
    <Copy SourceFiles="%(PyOutputFiles.Identity)" DestinationFiles="%(PyOutputFiles.Destination)"/>
    <WriteLinesToFile File="$(TLogLocation)$(ProjectName).write.u.tlog" Lines="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')" Overwrite="True"/>
  </Target>
</Project>