-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.wls
More file actions
executable file
·32 lines (27 loc) · 769 Bytes
/
Copy pathbuild.wls
File metadata and controls
executable file
·32 lines (27 loc) · 769 Bytes
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
#!/usr/bin/env wolframscript
Needs["CCompilerDriver`"];
Needs["GeneralUtilities`"];
$success = True;
Check[
$repoRoot = DirectoryName[$InputFileName];
With[{
cppSource = FileNameJoin[{$repoRoot, "libCombinatorEvolve"}]},
CreateLibrary[
FileNames["*.cpp", AbsoluteFileName[cppSource]],
"libCombinatorEvolve",
"CleanIntermediate" -> True,
"CompileOptions" -> Switch[$OperatingSystem,
"Windows",
{"/std:c++17", "/EHsc"},
_,
{"-std=c++17 -lgmp"}],
"Language" -> "C++",
"TargetDirectory" -> FileNameJoin[{$repoRoot, "LibraryResources", $SystemID}],
"TargetSystemID" -> $SystemID];
];,
$success = False;
];
If[$success,
Print["Build done."];,
Print["Build failed."];
];