-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuildSettings.wl
More file actions
64 lines (61 loc) · 1.68 KB
/
Copy pathBuildSettings.wl
File metadata and controls
64 lines (61 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
(* ::Package:: *)
Print["Reading build settings from ",FileNameJoin[{DirectoryName[$InputFileName],"BuildSettings.m"}]];
Switch[ $OperatingSystem
,"MacOSX",
(* Compilation settings for OS X. Assuming Apple Clang compiler is used.*)
{
"CompileOptions" -> {
" -Wall"
,"-Wextra"
,"-Wno-unused-parameter"
,"-gline-tables-only"
,"-gcolumn-info"
,"-mmacosx-version-min="<>StringSplit[Import["!sw_vers &2>1","Text"]][[4]]
,"-std=c++20"
,"-Ofast"
,"-fno-math-errno"
,"-flto"
,"-pthread"
,"-march=native","-mtune=native"
}
,"LinkerOptions"->{"-lm","-ldl"}
,"IncludeDirectories" -> {
DirectoryName[$InputFileName]
}
,"LibraryDirectories" -> {}
(*,"ShellCommandFunction" -> Print*)
,"ShellOutputFunction" -> (If[#=!="",Print[#]]&)
},
"Unix", (* Compilation settings for Linux on x86 architecture. Untested so far. *)
{
"CompileOptions" -> {
" -Wall"
,"-Wextra"
,"-std=c++20"
,"-Wno-unused-parameter"
,"-Ofast"
,"-fno-math-errno"
,"-flto"
,"-pthread"
,"-march=native","-mtune=native"
}
,"LinkerOptions"->{"-lm","-ldl"}
,"IncludeDirectories" -> {
FileNameJoin[{DirectoryName[$InputFileName]}]
}
,"LibraryDirectories" -> {}
(*,"ShellCommandFunction" -> Print*)
,"ShellOutputFunction" -> (If[#=!="",Print[#]]&)
},
"Windows", (* Compilation settings for Windows and Microsoft Visual Studio. Untested so far. *)
{
"CompileOptions" -> {"/EHsc", "/wd4244", "/DNOMINMAX", "/arch:AVX","/O2"}
,"LinkerOptions"->{}
,"IncludeDirectories" -> {
FileNameJoin[{DirectoryName[$InputFileName]}]
}
,"LibraryDirectories" -> {}
(*,"ShellCommandFunction" -> Print*)
,"ShellOutputFunction" -> (If[#=!="",Print[#]]&)
}
]