3 REM Copyright 2005-2010 Intel Corporation. All Rights Reserved.
5 REM This file is part of Threading Building Blocks.
7 REM Threading Building Blocks is free software; you can redistribute it
8 REM and/or modify it under the terms of the GNU General Public License
9 REM version 2 as published by the Free Software Foundation.
11 REM Threading Building Blocks is distributed in the hope that it will be
12 REM useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 REM of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 REM GNU General Public License for more details.
16 REM You should have received a copy of the GNU General Public License
17 REM along with Threading Building Blocks; if not, write to the Free Software
18 REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 REM As a special exception, you may use this file as part of a free software
21 REM library without restriction. Specifically, if other files instantiate
22 REM templates or use macros or inline functions from this file, or you compile
23 REM this file and link it with other files to produce an executable, this
24 REM file does not by itself cause the resulting executable to be covered by
25 REM the GNU General Public License. This exception does not however
26 REM invalidate any other reasons why the executable file might be covered by
27 REM the GNU General Public License.
31 if (%1) == () goto Syntax
33 SET TBB30_BIN_DIR=%~d0%~p0
35 SET TBB30_INSTALL_DIR=%TBB30_BIN_DIR%..
38 :: Parse the incoming arguments
39 if /i "%1"=="" goto SetEnv
40 if /i "%1"=="ia32" (set TBB_TARGET_ARCH=ia32) & shift & goto ParseArgs
41 if /i "%1"=="intel64" (set TBB_TARGET_ARCH=intel64) & shift & goto ParseArgs
42 if /i "%1"=="vs2005" (set TBB_TARGET_VS=vc8) & shift & goto ParseArgs
43 if /i "%1"=="vs2008" (set TBB_TARGET_VS=vc9) & shift & goto ParseArgs
44 if /i "%1"=="vs2010" (set TBB_TARGET_VS=vc10) & shift & goto ParseArgs
45 if /i "%1"=="all" (set TBB_TARGET_VS=vc_mt) & shift & goto ParseArgs
49 if ("%TBB_TARGET_VS%") == ("") set TBB_TARGET_VS=vc_mt
51 SET TBB_ARCH_PLATFORM=%TBB_TARGET_ARCH%\%TBB_TARGET_VS%
52 if exist "%TBB30_BIN_DIR%\%TBB_ARCH_PLATFORM%\tbb.dll" SET PATH=%TBB30_BIN_DIR%\%TBB_ARCH_PLATFORM%;%PATH%
53 if exist "%TBB30_INSTALL_DIR%\..\redist\%TBB_TARGET_ARCH%\tbb\%TBB_TARGET_VS%\tbb.dll" SET PATH=%TBB30_INSTALL_DIR%\..\redist\%TBB_TARGET_ARCH%\tbb\%TBB_TARGET_VS%;%PATH%
54 SET LIB=%TBB30_INSTALL_DIR%\lib\%TBB_ARCH_PLATFORM%;%LIB%
55 SET INCLUDE=%TBB30_INSTALL_DIR%\include;%INCLUDE%
56 IF ("%ICPP_COMPILER11%") NEQ ("") SET TBB_CXX=icl.exe
57 IF ("%ICPP_COMPILER12%") NEQ ("") SET TBB_CXX=icl.exe
62 echo %SCRIPT_NAME% ^<arch^> ^<vs^>
63 echo ^<arch^> must be is one of the following
64 echo ia32 : Set up for IA-32 architecture
65 echo intel64 : Set up for Intel(R) 64 architecture
66 echo ^<vs^> should be one of the following
67 echo vs2005 : Set to use with Microsoft Visual Studio 2005 runtime DLLs
68 echo vs2008 : Set to use with Microsoft Visual Studio 2008 runtime DLLs
69 echo vs2010 : Set to use with Microsoft Visual Studio 2010 runtime DLLs
70 echo all : Set to use TBB statically linked with Microsoft Visual C++ runtime
71 echo if ^<vs^> is not set TBB statically linked with Microsoft Visual C++ runtime will be used.