You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.5 KiB

  1. @echo off
  2. REM
  3. REM Copyright 2005-2013 Intel Corporation. All Rights Reserved.
  4. REM
  5. REM This file is part of Threading Building Blocks.
  6. REM
  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.
  10. REM
  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.
  15. REM
  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
  19. REM
  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.
  28. REM
  29. set SCRIPT_NAME=%~nx0
  30. if (%1) == () goto Syntax
  31. SET TBB_BIN_DIR=%~d0%~p0
  32. SET TBBROOT=%TBB_BIN_DIR%..
  33. :ParseArgs
  34. :: Parse the incoming arguments
  35. if /i "%1"=="" goto SetEnv
  36. if /i "%1"=="ia32" (set TBB_TARGET_ARCH=ia32) & shift & goto ParseArgs
  37. if /i "%1"=="intel64" (set TBB_TARGET_ARCH=intel64) & shift & goto ParseArgs
  38. if /i "%1"=="vs2005" (set TBB_TARGET_VS=vc8) & shift & goto ParseArgs
  39. if /i "%1"=="vs2008" (set TBB_TARGET_VS=vc9) & shift & goto ParseArgs
  40. if /i "%1"=="vs2010" (set TBB_TARGET_VS=vc10) & shift & goto ParseArgs
  41. if /i "%1"=="vs2012" (set TBB_TARGET_VS=vc11) & shift & goto ParseArgs
  42. if /i "%1"=="all" (set TBB_TARGET_VS=vc_mt) & shift & goto ParseArgs
  43. :SetEnv
  44. if ("%TBB_TARGET_VS%") == ("") set TBB_TARGET_VS=vc_mt
  45. SET TBB_ARCH_PLATFORM=%TBB_TARGET_ARCH%\%TBB_TARGET_VS%
  46. if exist "%TBB_BIN_DIR%\%TBB_ARCH_PLATFORM%\tbb.dll" SET PATH=%TBB_BIN_DIR%\%TBB_ARCH_PLATFORM%;%PATH%
  47. if exist "%TBBROOT%\..\redist\%TBB_TARGET_ARCH%\tbb\%TBB_TARGET_VS%\tbb.dll" SET PATH=%TBBROOT%\..\redist\%TBB_TARGET_ARCH%\tbb\%TBB_TARGET_VS%;%PATH%
  48. SET LIB=%TBBROOT%\lib\%TBB_ARCH_PLATFORM%;%LIB%
  49. SET INCLUDE=%TBBROOT%\include;%INCLUDE%
  50. IF ("%ICPP_COMPILER11%") NEQ ("") SET TBB_CXX=icl.exe
  51. IF ("%ICPP_COMPILER12%") NEQ ("") SET TBB_CXX=icl.exe
  52. IF ("%ICPP_COMPILER13%") NEQ ("") SET TBB_CXX=icl.exe
  53. goto End
  54. :Syntax
  55. echo Syntax:
  56. echo %SCRIPT_NAME% ^<arch^> ^<vs^>
  57. echo ^<arch^> must be is one of the following
  58. echo ia32 : Set up for IA-32 architecture
  59. echo intel64 : Set up for Intel(R) 64 architecture
  60. echo ^<vs^> should be one of the following
  61. echo vs2005 : Set to use with Microsoft Visual Studio 2005 runtime DLLs
  62. echo vs2008 : Set to use with Microsoft Visual Studio 2008 runtime DLLs
  63. echo vs2010 : Set to use with Microsoft Visual Studio 2010 runtime DLLs
  64. echo vs2012 : Set to use with Microsoft Visual Studio 2012 runtime DLLs
  65. echo all : Set to use TBB statically linked with Microsoft Visual C++ runtime
  66. echo if ^<vs^> is not set TBB statically linked with Microsoft Visual C++ runtime will be used.
  67. exit /B 1
  68. :End
  69. exit /B 0