create cntk.common.props to share common project property between C++ and C#; refactor related project files to use cntk.common.props

This commit is contained in:
Zhou Wang 2017-02-07 12:09:35 +01:00
Родитель 21f6883a1c
Коммит fe765f352a
3 изменённых файлов: 14 добавлений и 40 удалений

Просмотреть файл

@ -1,29 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\CNTK.Common.props" />
<PropertyGroup>
<!-- Note: SolutionDir / RepoRootPath are the same in current setup -->
<RepoRootPath>$(MSBuildThisFileDirectory)</RepoRootPath>
<RelativeProjectPath>$(MSBuildProjectDirectory.Substring($(MSBuildThisFileDirectory.Length)))</RelativeProjectPath>
<OutDir>$(RepoRootPath)$(Platform)\$(Configuration)\</OutDir>
<IntDir>$(RepoRootPath)$(Platform)\.build\$(Configuration)\$(RelativeProjectPath)\</IntDir>
<DebugBuild>false</DebugBuild>
<DebugBuild Condition="$(Configuration.StartsWith('Debug'))">true</DebugBuild>
<ReleaseBuild>false</ReleaseBuild>
<ReleaseBuild Condition="!$(DebugBuild)">true</ReleaseBuild>
<GpuBuild>true</GpuBuild>
<GpuBuild Condition="$(Configuration.EndsWith('_CpuOnly'))">false</GpuBuild>
<CpuOnlyBuild>true</CpuOnlyBuild>
<CpuOnlyBuild Condition="$(GpuBuild)">false</CpuOnlyBuild>
<NoOptBuild>false</NoOptBuild>
<NoOptBuild Condition="$(Configuration.Contains('NoOpt'))">true</NoOptBuild>
<CudaVersion/>
<CudaVersion />
<CudaVersion Condition="Exists('$(CUDA_PATH_V8_0)') And '$(CudaVersion)' == ''">8.0</CudaVersion>
<CudaVersion Condition="Exists('$(CUDA_PATH_V7_5)') And '$(CudaVersion)' == ''">7.5</CudaVersion>
@ -50,9 +29,6 @@
<HasMultiverso>false</HasMultiverso>
<HasMultiverso Condition="Exists('$(SolutionDir)\Source\Multiverso\include\multiverso')">true</HasMultiverso>
<HasSwig>false</HasSwig>
<HasSwig Condition="Exists('$(SWIG_PATH)\swig.exe')">true</HasSwig>
<!-- If an executable links ReaderLib.lib, it has dependency on Common.dll, Math.dll and PerformanceProfilerDll.dll -->
<ReaderLibs>ReaderLib.lib;Common.lib;Math.lib;PerformanceProfilerDll.lib</ReaderLibs>

Просмотреть файл

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" InitialTargets="CheckDependencies" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(SolutionDir)\CNTK.Common.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3500A847-E024-4E7D-92DD-CC587C17460B}</ProjectGuid>
<IntermediateOutputPath>$(SolutionDir)\$(Platform)\.build\$(Configuration)\$(MSBuildProjectDirectory.Substring($(SolutionDir.Length)))\obj\</IntermediateOutputPath>
<BaseIntermediateOutputPath>$(SolutionDir)\$(Platform)\.build\$(Configuration)\$(MSBuildProjectDirectory.Substring($(SolutionDir.Length)))\obj\</BaseIntermediateOutputPath>
<OutputPath>$(SolutionDir)\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>$(IntDir)obj\</IntermediateOutputPath>
<BaseIntermediateOutputPath>$(IntDir)obj\</BaseIntermediateOutputPath>
<OutputPath>$(OutDir)</OutputPath>
<OutputType>Exe</OutputType>
<PlatformTarget>x64</PlatformTarget>
<WarningLevel>4</WarningLevel>
@ -80,9 +81,9 @@
<Compile Include="Program.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="Build" Condition="Exists('$(SWIG_PATH)\swig.exe')" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Build" Condition="$(HasSwig)" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="CheckDependencies">
<Warning Condition="!Exists('$(SWIG_PATH)\swig.exe')" Text="The project requires SWIG to be installed. Please see https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#optional-cntk-cnet-library-for-evaluation for installation instructions." />
<Warning Condition="!$(HasSwig)" Text="The project requires SWIG to be installed. Please see https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#optional-cntk-cnet-library-for-evaluation for installation instructions." />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Просмотреть файл

@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" InitialTargets="CheckDependencies" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(SolutionDir)\CNTK.Common.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{50EF9EE6-5018-453E-A063-F77044EF1A97}</ProjectGuid>
<GpuBuild>true</GpuBuild>
<GpuBuild Condition="$(Configuration.EndsWith('_CpuOnly'))">false</GpuBuild>
<CpuOnlyBuild>true</CpuOnlyBuild>
<CpuOnlyBuild Condition="$(GpuBuild)">false</CpuOnlyBuild>
<IntermediateOutputPath>$(SolutionDir)\$(Platform)\.build\$(Configuration)\$(MSBuildProjectDirectory.Substring($(SolutionDir.Length)))\obj\</IntermediateOutputPath>
<BaseIntermediateOutputPath>$(SolutionDir)\$(Platform)\.build\$(Configuration)\$(MSBuildProjectDirectory.Substring($(SolutionDir.Length)))\obj\</BaseIntermediateOutputPath>
<OutputPath>$(SolutionDir)\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>$(IntDir)obj\</IntermediateOutputPath>
<BaseIntermediateOutputPath>$(IntDir)obj\</BaseIntermediateOutputPath>
<OutputPath>$(OutDir)</OutputPath>
<OutputType>Library</OutputType>
<PlatformTarget>x64</PlatformTarget>
<WarningLevel>4</WarningLevel>
@ -123,9 +120,9 @@
<None Include="CNTKLibraryManagedDll-GPU-KeyPair.snk" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="Build" Condition="Exists('$(SWIG_PATH)\swig.exe')" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Build" Condition="$(HasSwig)" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="CheckDependencies">
<Warning Condition="!Exists('$(SWIG_PATH)\swig.exe')" Text="The project requires SWIG to be installed. Please see https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#optional-cntk-cnet-library-for-evaluation for installation instructions." />
<Warning Condition="!$(HasSwig)" Text="The project requires SWIG to be installed. Please see https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#optional-cntk-cnet-library-for-evaluation for installation instructions." />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.