add VS2013 detection
[scilab.git] / scilab / modules / dynamic_link / macros / detectmsifort64tools.sci
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) DIGITEO - Allan CORNET
3 //
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution.  The terms
7 // are also available at
8 // http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
9
10 //=============================================================================
11 function bOK = detectmsifort64tools()
12
13     bOK = %F;
14     if getos() == "Windows" & win64() then
15         IFORTPATH = "";
16         ifortcomp = findmsifortcompiler();
17         if ifortcomp <> "unknown" then
18             select ifortcomp,
19             case  "ifort14" then
20                 IFORTPATH = getenv("IFORT_COMPILER14","");
21
22             case  "ifort13" then
23                 IFORTPATH = getenv("IFORT_COMPILER13","");
24
25             case  "ifort12" then
26                 IFORTPATH = getenv("IFORT_COMPILER12","");
27
28             case  "ifort11" then
29                 IFORTPATH = getenv("IFORT_COMPILER11","");
30
31             case  "ifort10" then
32                 IFORTPATH = getenv("IFORT_COMPILER10","");
33
34             case  "ifort9" then
35                 IFORTPATH = getenv("IFORT_COMPILER9","");
36
37             else
38                 show = displayWarningmsifort();
39                 if show then
40                     TXT = gettext("Intel Fortran Compiler 9, 10, 11 or 12 Compiler not found.");
41                     warning(TXT);
42                     clear TXT;
43                     disableWarningmsifort();
44                 end
45                 bOK = %F;
46                 return
47             end
48         end
49
50         select ifortcomp,
51         case  "ifort14" then
52             IFORTSPATHEMT64 = IFORTPATH + "compiler\lib\intel64";
53         case  "ifort13" then
54             IFORTSPATHEMT64 = IFORTPATH + "compiler\lib\intel64";
55         case  "ifort12" then
56             IFORTSPATHEMT64 = IFORTPATH + "compiler\lib\intel64";
57         case  "ifort11" then
58             IFORTSPATHEMT64 = IFORTPATH + "lib\intel64";
59         else
60             IFORTSPATHEMT64 = IFORTPATH + "em64t";
61         end
62
63         if isdir(IFORTSPATHEMT64) then
64             bOK = %T;
65         end
66     end
67
68 endfunction
69 //=============================================================================
70 function show = displayWarningmsifort()
71     settings_filename = "/.settings_warning_msif";
72     settings_file = pathconvert(SCIHOME+settings_filename,%f,%t);
73     w = fileinfo(settings_file);
74     show = %t;
75     if isfile(settings_file) then
76         show = grep(mgetl(settings_file),"displayWarningIFx64=no")==[]
77     end
78 endfunction
79 //=============================================================================
80 function disableWarningmsifort()
81     settings_filename = "/.settings_warning_msif";
82     settings_file = pathconvert(SCIHOME+settings_filename,%f,%t);
83     mputl("displayWarningIFx64=no",settings_file);
84 endfunction
85 //=============================================================================