Changeset 7939


Ignore:
Timestamp:
03/15/19 17:18:14 (2 months ago)
Author:
baker
Message:

rewrite ew_nt.cmd to avoid () clauses in IF commands to define environment variables properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/environment/ew_nt.cmd

    r7936 r7939  
    1 @Echo off 
     1@Echo Off 
    22 
    33PushD . 
     
    66@Rem --------------------------------------------------------------- 
    77Set EW_INSTALLATION=INST_UNKNOWN 
    8 Set EW_HOME=e:\earthworm 
    9 Set EW_VERSION=earthworm_svn 
    10 Set EW_BITS=64 
     8Set EW_HOME=C:\earthworm 
     9Set EW_VERSION=earthworm_7.10 
     10Set EW_BITS=32 
    1111 
    12 Set EW_RUN_DIR=%EW_HOME%\memphis 
     12Set EW_RUN_DIR=%EW_HOME%\run_working 
    1313Set EW_PARAMS=%EW_RUN_DIR%\params\ 
    1414Set EW_LOG=%EW_RUN_DIR%\log\ 
     
    4848:SETUP_START 
    4949 
     50If "%FC%" == "" ( Goto SETUP_MSVC ) 
     51 
    5052@Rem Set up the Fortran compilation environment 
    5153@Rem ------------------------------------------ 
    52 If "%FC%" == "" ( Goto SETUP_MSVC ) 
    5354 
    54 If "%FC%" == "ifort" ( 
     55:SETUP_FC 
    5556 
    56    @Rem Set up Intel Fortran compilation environment 
    57    @Rem -------------------------------------------- 
     57If NOT "%FC%" == "ifort" ( Goto END_IFORT ) 
    5858 
    59    Set target= 
    60    If "%EW_BITS%" == "32" ( Set target=ia32    ) 
    61    If "%EW_BITS%" == "64" ( Set target=intel64 ) 
     59@Rem Set up Intel Fortran compilation environment 
     60@Rem -------------------------------------------- 
    6261 
    63    @Rem Intel Parallel Studio (formerly Composer) XE 2015 Update 4 for Windows 
    64    @Rem From the Start menu, select IA-32 Visual Studio 2015 mode, 
    65    @Rem which will execute the following command; SDK 8.1 will be used 
    66    @Rem Call "C:\Program Files (x86)\Intel\Composer XE 2015\bin\ifortvars.bat" %target% 
    67    @Rem Intel Parallel Studio XE 2016 for Windows 
    68    @Rem Call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat" %target% 
    69  Call "w:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat" intel64 
    70    @Rem Define the Intel Fortran compiler options 
    71    @Rem Extra run-time checks: /check:bounds,uninit 
    72    @Rem ifort version 15 introduced the /Qinit option; older compilers complain, but ignore it 
    73    @Rem ifort complains about comments past column 72; /warn:truncated_source is pretty useless 
    74    @Rem Set FFLAGS=/nologo /O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /check:bounds,uninit /Qdiag-disable:8290 /traceback 
    75    Set FFLAGS=/nologo /O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /Qdiag-disable:8290 /traceback 
     62Set target= 
     63If "%EW_BITS%" == "32" ( Set target=ia32    ) 
     64If "%EW_BITS%" == "64" ( Set target=intel64 ) 
    7665 
    77    @Rem FC_MAIN_IS_C is not necessary for MSVC 
    78    @Rem Set FC_MAIN_IS_C=-nofor-main 
     66@Rem Intel Parallel Studio (formerly Composer) XE 2015 Update 4 for Windows 
     67@Rem From the Start menu, select IA-32 Visual Studio 2015 mode, 
     68@Rem which will execute the following command; SDK 8.1 will be used 
     69@Rem Call "C:\Program Files (x86)\Intel\Composer XE 2015\bin\ifortvars.bat" %target% 
     70@Rem Intel Parallel Studio XE 2016 for Windows 
     71@Rem Call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat" %target% 
    7972 
    80 ) 
     73@Rem Define the Intel Fortran compiler options 
     74@Rem Extra run-time checks: /check:bounds,uninit 
     75@Rem ifort version 15 introduced the /Qinit option; older compilers complain, but ignore it 
     76@Rem ifort complains about comments past column 72; /warn:truncated_source is pretty useless 
     77@Rem Set FFLAGS=/nologo /O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /check:bounds,uninit /Qdiag-disable:8290 /traceback 
     78Set FFLAGS=/nologo /O3 /Qinit:snan /Qinit:arrays /extend-source /warn:truncated_source /fpe-all:0 /Qdiag-disable:8290 /traceback 
     79 
     80@Rem FC_MAIN_IS_C is not necessary for MSVC 
     81@Rem Set FC_MAIN_IS_C=-nofor-main 
     82 
     83:END_IFORT 
    8184 
    8285@Rem Make sure the Fortran compiler is usable 
    8386If NOT "%FC%" == "" ( 
    84    where %FC% 
     87   where %FC% >NUL 
    8588   If %ERRORLEVEL% NEQ 0 ( 
    8689      @Set FC= 
    8790   ) 
    8891) 
     92 
     93@Rem The Intel Fortran compiler setup scripts also set up the MSVC environment 
     94If "%FC%" == "ifort" Goto :SETUP_END 
    8995 
    9096@Rem Set up Visual C++ compilation environment  
     
    98104:SETUP_MSVC 
    99105 
    100 If NOT "%FC%" == "" Goto :SETUP_END 
     106Set target= 
     107If "%EW_BITS%" == "32" ( Set target=x86   ) 
     108If "%EW_BITS%" == "64" ( Set target=amd64 ) 
    101109 
    102    Set target= 
    103    If "%EW_BITS%" == "32" ( Set target=x86   ) 
    104    If "%EW_BITS%" == "64" ( Set target=amd64 ) 
     110@Rem From the Start menu, select VS2015 x64 Native Tools Command Prompt, 
     111@Rem which will execute the following command; SDK 8.1 will be used 
     112@Rem Call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %target% 
     113@Rem Call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %target% 
    105114 
    106    @Rem From the Start menu, select VS2015 x64 Native Tools Command Prompt, 
    107    @Rem which will execute the following command; SDK 8.1 will be used 
    108    @Rem Call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %target% 
    109    @Rem Call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %target% 
    110 Call "w:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 
    111115@Rem End of compiler(s) setup 
    112116@Rem ------------------------ 
     117 
    113118:SETUP_END 
    114119 
Note: See TracChangeset for help on using the changeset viewer.