Sfoglia il codice sorgente

tools/msvc: batch and project files to execute StarPU applications under windows

Nathalie Furmento 12 anni fa
parent
commit
889d351d6d

+ 20 - 0
tools/msvc/starpu.sln

@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "starpu", "starpu\starpu.vcxproj", "{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}.Debug|Win32.Build.0 = Debug|Win32
+		{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}.Release|Win32.ActiveCfg = Release|Win32
+		{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 83 - 0
tools/msvc/starpu/starpu.vcxproj

@@ -0,0 +1,83 @@
+<?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>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{1A4DC8EB-1250-4DC5-B3CE-2E4BB4C51CA3}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>starpu</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>NotUsing</PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(STARPUPATH)\include\starpu\1.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalLibraryDirectories>$(STARPUPATH)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>libstarpu-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
+    <Link>
+      <SubSystem>Console</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="starpu_appli.c" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 24 - 0
tools/msvc/starpu_clean.bat

@@ -0,0 +1,24 @@
+REM StarPU --- Runtime system for heterogeneous multicore architectures.
+REM
+REM Copyright (C) 2013  Centre National de la Recherche Scientifique
+REM
+REM StarPU is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU Lesser General Public License as published by
+REM the Free Software Foundation; either version 2.1 of the License, or (at
+REM your option) any later version.
+REM
+REM StarPU is distributed in the hope that it will be useful, but
+REM WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+REM
+REM See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+@ECHO OFF
+TITLE MSVC StarPU Cleaning
+ECHO.
+ECHO MSVC StarPU Cleaning
+ECHO.
+
+FOR %%d in (debug starpu\debug ipch) DO IF EXIST %%d RMDIR /S /Q %%d 
+DEL starpu.sdf
+

+ 47 - 0
tools/msvc/starpu_exec.bat

@@ -0,0 +1,47 @@
+REM StarPU --- Runtime system for heterogeneous multicore architectures.
+REM
+REM Copyright (C) 2013  Centre National de la Recherche Scientifique
+REM
+REM StarPU is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU Lesser General Public License as published by
+REM the Free Software Foundation; either version 2.1 of the License, or (at
+REM your option) any later version.
+REM
+REM StarPU is distributed in the hope that it will be useful, but
+REM WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+REM
+REM See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+@ECHO OFF
+TITLE MSVC StarPU Execution
+ECHO.
+ECHO MSVC StarPU Execution
+ECHO.
+ECHO %STARPUPATH%
+
+IF "%1" == "" GOTO invalidparam
+IF NOT EXIST %1 GOTO invalidparam
+IF NOT EXIST %STARPUPATH%\AUTHORS GOTO starpunotfound
+
+COPY %1 starpu\starpu_appli.c
+FOR %%F IN (%STARPUPATH%\bin\*dll) DO COPY %%F starpu\%%~nF
+COPY /cygdrive/c/MinGW/bin/pthreadGC2.dll starpu
+RMDIR /S /Q Debug
+RMDIR /S /Q starpu\Debug
+
+"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" starpu.sln
+
+GOTO end
+
+:invalidparam
+  ECHO.
+  ECHO Syntax error. You need to give the name of a StarPU application
+  GOTO end
+
+:starpunotfound
+  ECHO.
+  ECHO You need to set the variable STARPUPATH to a valid StarPU installation directory
+  GOTO end
+
+:end