summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authorScott Wegner <swegner@hdfgroup.org>2008-07-02 19:40:00 (GMT)
committerScott Wegner <swegner@hdfgroup.org>2008-07-02 19:40:00 (GMT)
commit2b50ce69837f55e009b500237e66989c8f1f8946 (patch)
treebfc72f14202a2f3a21af9a81a5a91a190024b9e8 /windows
parent7722c4c834891e088666945742fc1a5a3162b947 (diff)
downloadhdf5-2b50ce69837f55e009b500237e66989c8f1f8946.zip
hdf5-2b50ce69837f55e009b500237e66989c8f1f8946.tar.gz
hdf5-2b50ce69837f55e009b500237e66989c8f1f8946.tar.bz2
[svn-r15312] Purpose: Support Visual Studio 2008 on Windows
Description: Write documentation for building HDF5 with the latest version of Visual Studio, 2008. The process is very similar to building with Visual Studio 2005, but with an automatic project-file conversion beforehand. Also adapt commandline build scripts for Visual Studio 2008 as well. Tested: VS2008 on WinXP
Diffstat (limited to 'windows')
-rwxr-xr-xwindows/hdf5bt.BAT14
-rwxr-xr-xwindows/hdf5build.BAT86
2 files changed, 94 insertions, 6 deletions
diff --git a/windows/hdf5bt.BAT b/windows/hdf5bt.BAT
index 555d715..dd48f10 100755
--- a/windows/hdf5bt.BAT
+++ b/windows/hdf5bt.BAT
@@ -18,6 +18,8 @@ rem This batch file is used to build and test HDF5 Libraries and Tools.
rem This batch file takes the following options:
rem . /vs7 Build HDF5 using Visual Studio .NET 2003
rem . Note: Default is Visual Studio 2005
+rem . /vs9 Build HDF5 using Visual Studio 2008
+rem . Note: Default is Visual Studio 2005
rem . /fort Build and test HDF5 with Fortran libraries
rem . /useenv Build HDF5 using compiler settings defined
rem . in the environment, rather than the IDE.
@@ -29,7 +31,7 @@ rem . HDF5CHECK_LOG
rem . /? Help information
rem By Xuan Bai
rem Created: Aug. 16, 2004
-rem Last Updated: Scott Wegner, 6/30/08
+rem Last Updated: Scott Wegner, 7/2/08
rem This batch file makes the following assumptions:
rem - The appropriate version of Visual Studio is installed and setup
@@ -63,6 +65,8 @@ rem Print a help message
echo.
echo. /vs7 Build HDF5 using Visual Studio .NET 2003
echo. Note: Default is Visual Studio 2005
+ echo. /vs9 Build HDF5 using Visual Studio 2008
+ echo. Note: Default is Visual Studio 2005
echo. /fort Build and test HDF5 with Fortran libraries
echo. /ivf101 Build HDF5 Fortran using Intel Visual Fortran 10.1
echo. Note: Default is Intel Visual Fortran 9.1
@@ -81,6 +85,10 @@ rem Parse through the parameters sent to file, and set appropriate variables
rem Use Visual Studio .NET to build
set hdf5_vnet=true
+ ) else if "%%a"=="/vs9" (
+ rem Use Visual Studio 2008 to build
+ set hdf5_vs2008=true
+
) else if "%%a"=="/fort" (
rem Enable Fortran
set hdf5_enablefortran=true
@@ -125,6 +133,10 @@ rem Setup our environment
set hdf5build_params=%hdf5build_params% /vs7
)
+ if defined hdf5_vs2008 (
+ set hdf5build_params=%hdf5build_params% /vs9
+ )
+
if defined hdf5_enablefortran (
set hdf5build_params=%hdf5build_params% /fort
set hdf5check_params=enableall
diff --git a/windows/hdf5build.BAT b/windows/hdf5build.BAT
index 3a6d641..abb6c90 100755
--- a/windows/hdf5build.BAT
+++ b/windows/hdf5build.BAT
@@ -18,6 +18,8 @@ rem This batch file is used to build HDF5 Libraries and Tools.
rem This batch file takes the following options:
rem . /vs7 Build HDF5 using Visual Studio .NET 2003
rem . Note: Default is Visual Studio 2005
+rem . /vs9 Build HDF5 using Visual Studio 2008
+rem . Note: Default is Visual Studio 2005
rem . /fort Build HDF5 with Fortran libraries
rem . /ivf101 Build HDF5 Fortran using Intel Visual Fortran 10.1
rem . Note: Default is Intel Visual Fortran 9.1
@@ -26,7 +28,7 @@ rem . in the environment, rather than the IDE.
rem . /? Help information
rem By Xuan Bai
rem Created: Aug. 16, 2004
-rem Last Updated: Scott Wegner, 6/30/08
+rem Last Updated: Scott Wegner, 7/2/08
rem This batch file makes the following assumptions:
rem - The appropriate version of Visual Studio is installed and setup
@@ -58,6 +60,8 @@ rem Print a help message
echo.
echo. /vs7 Build HDF5 using Visual Studio .NET 2003
echo. Note: Default is Visual Studio 2005
+ echo. /vs9 Build HDF5 using Visual Studio 2008
+ echo. Note: Default is Visual Studio 2005
echo. /fort Build HDF5 with Fortran libraries using the
echo. Intel Fortran version specified, or 9.1 by default
echo. /ivf101 Build HDF5 Fortran using Intel Visual Fortran 10.1
@@ -77,6 +81,10 @@ rem Parse through the parameters sent to file, and set appropriate variables
rem Use Visual Studio .NET 2003
set hdf5_vnet=true
+ ) else if "%%a"=="/vs9" (
+ rem Use Visual Studio .NET 2003
+ set hdf5_vs2008=true
+
) else if "%%a"=="/fort" (
rem Enable Fortran
set hdf5_enablefortran=true
@@ -123,11 +131,26 @@ rem Setup our environment
exit /b 1
)
)
+ rem Make sure /vs7 and /vs9 weren't specified together
+ if "%hdf5_vnet%%hdf5_vs2008%"=="truetrue" (
+ echo.Error: /vs7 and /vs9 should not be specified together.
+ exit /b 1
+ )
rem Figure out which solution file to use based on configuration
if defined hdf5_vnet (
echo.Using Visual Studio .NET 2003
- set hdf5_sln="%CD%\windows_vnet\proj\all\all.sln"
+ set hdf5_sln="%CD%\windows_vnet\proj\all\all.sln"
+
+ ) else if defined hdf5_vs2008 (
+ echo.Using Visual Studio 2008
+ if defined hdf5_enablefortran (
+ echo.Building Fortran projects enabled
+ set hdf5_sln="%CD%\windows\proj\all_fortran\all_fortran.sln"
+ ) else (
+ set hdf5_sln="%CD%\windows\proj\all\all.sln"
+ )
+
) else (
echo.Using Visual Studio 2005
if defined hdf5_enablefortran (
@@ -164,6 +187,42 @@ rem Setup our environment
echo.make sure VS71COMNTOOLS is defined in the environment.
exit /b 1
)
+
+ ) else if defined hdf5_vs2008 (
+ if not defined hdf5_enablefortran (
+ if defined vs90comntools (
+ rem This sets the Visual Studio 2005 path and environment variables
+ if %hdf5_platform%==Win32 (
+ call "%vs90comntools%\..\..\VC\vcvarsall.bat" x86
+ ) else (
+ call "%vs90comntools%\..\..\VC\vcvarsall.bat" x86_amd64
+ )
+
+ ) else (
+ echo.Error: Cannot setup Visual Studio 2008 environment. Please
+ echo.make sure VS90COMNTOOLS is defined in the environment.
+ exit /b 1
+ )
+
+ ) else (
+ echo.with Intel Visual Fortran 10.1
+
+ if defined ifort_compiler10 (
+ rem This sets the Intel Fortran 10.1 environment, as well as
+ rem setting the appropriate Visual Studio environment
+
+ if %hdf5_platform%==Win32 (
+ call "%ifort_compiler10%\IA32\Bin\ifortvars.bat"
+ ) else (
+ call "%ifort_compiler10%\em64t\Bin\ifortvars.bat"
+ )
+ ) else (
+ echo.Error: Cannot setup Intel Fortran 10.1 environment. Please
+ echo.make sure IFORT_COMPILER10 is defined in the environment.
+ exit /b 1
+ )
+ )
+
) else (
rem Assume Visual Studio 2005
if not defined hdf5_enablefortran (
@@ -204,7 +263,7 @@ rem Setup our environment
echo.with Intel Visual Fortran 10.1
if defined ifort_compiler10 (
- rem This sets the Intel Fortran 9.1 environment, as well as
+ rem This sets the Intel Fortran 10.1 environment, as well as
rem setting the appropriate Visual Studio environment
if %hdf5_platform%==Win32 (
@@ -231,6 +290,15 @@ rem Setup our environment
exit /b 0
+rem Upgrade the project files to the latest format for Visual Studio
+:upgrade
+
+ echo.Upgrading project files
+ devenv %hdf5_sln% /Upgrade /NoLogo
+
+ exit /b
+
+
rem Build the HDF5 libraries. By default, C and C++ libraries are built.
:all
@@ -244,8 +312,7 @@ rem Build the HDF5 libraries. By default, C and C++ libraries are built.
rem Build both debug and release versions
for %%a in (debug release) DO (
echo.Building %hdf5_platform% %%a libraries...
- rem Only add hdf5_platform if using Visual Studio 2005, because Visual Studio
- rem .NET doesn't like the syntax
+ rem Only add hdf5_platform if not using Visual Studio .NET, because it doesn't like the syntax
if defined hdf5_vnet (
devenv %hdf5_sln% %ccflags% /rebuild %%a
) else (
@@ -291,6 +358,15 @@ rem This is where the magic happens
echo.Error setting up build environment.
goto error
)
+
+ rem Upgrade the project files if needed
+ if defined hdf5_vs2008 (
+ call :upgrade
+ if !errorlevel! neq 0 (
+ echo.Error upgrading project files!
+ goto error
+ )
+ )
echo.Building HDF5 Libraries and Tools
echo.