@echo off :: :: Copyright (C) 1985-2017 Intel Corporation. All rights reserved. :: :: The information and source code contained herein is the exclusive property :: of Intel Corporation and may not be disclosed, examined, or reproduced in :: whole or in part without explicit written authorization from the Company. :: :: Cache some environment variables. set BIN_ROOT=%~dp0 :: Set the default arguments set TARGET_ARCH= :ParseArgs :: Parse the incoming arguments if /i "%1"=="" goto Build if /i "%1"=="ia32_intel64" (set TARGET_ARCH=intel64) & shift & goto ParseArgs if /i "%1"=="intel64" (set TARGET_ARCH=intel64) & shift & goto ParseArgs shift & goto ParseArgs :Build if defined INSPECTOR_2017_DIR ( if exist "%INSPECTOR_2017_DIR%\inspxe-vars.bat" @call "%INSPECTOR_2017_DIR%\inspxe-vars.bat" quiet ) if defined VTUNE_AMPLIFIER_XE_2017_DIR ( if exist "%VTUNE_AMPLIFIER_XE_2017_DIR%\amplxe-vars.bat" @call "%VTUNE_AMPLIFIER_XE_2017_DIR%\amplxe-vars.bat" quiet ) if defined ADVISOR_2017_DIR ( if exist "%ADVISOR_2017_DIR%\advixe-vars.bat" @call "%ADVISOR_2017_DIR%\advixe-vars.bat" quiet ) if /i "%TARGET_ARCH%"=="intel64" ( :: MPI if defined I_MPI_ROOT ( if exist "%I_MPI_ROOT%\intel64\bin\mpivars.bat" ( @call "%I_MPI_ROOT%\intel64\bin\mpivars.bat" ) ) :: ITAC if exist "%BIN_ROOT%..\..\..\itac_2017\bin\itacvars.bat" ( @call "%BIN_ROOT%..\..\..\itac_2017\bin\itacvars.bat" ) else ( if exist "%BIN_ROOT%..\..\..\..\itac_2017\bin\itacvars.bat" @call "%BIN_ROOT%..\..\..\..\itac_2017\bin\itacvars.bat" ) ) if exist "%BIN_ROOT%compilervars.bat" @call "%BIN_ROOT%compilervars.bat" %*