|
@@ -43,25 +43,18 @@ class Cpp {
|
|
|
static public function run(args:Array<String>, testCompiled:Bool, testCppia:Bool) {
|
|
|
getCppDependencies();
|
|
|
|
|
|
- switch (systemName) {
|
|
|
- case "Windows":
|
|
|
- if (testCompiled) {
|
|
|
- runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M32"].concat(args));
|
|
|
- runCpp("bin/cpp/TestMain-debug", []);
|
|
|
- }
|
|
|
- case _:
|
|
|
- if (testCompiled) {
|
|
|
- runCommand("rm", ["-rf", "cpp"]);
|
|
|
- runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M64"].concat(args));
|
|
|
- runCpp("bin/cpp/TestMain-debug", []);
|
|
|
- }
|
|
|
+ var archFlag = if (systemName == "Windows") "HXCPP_M32" else "HXCPP_M64";
|
|
|
+ if (testCompiled) {
|
|
|
+ runCommand("rm", ["-rf", "cpp"]);
|
|
|
+ runCommand("haxe", ["compile-cpp.hxml", "-D", archFlag].concat(args));
|
|
|
+ runCpp("bin/cpp/TestMain-debug", []);
|
|
|
+ }
|
|
|
|
|
|
- if (testCppia) {
|
|
|
- runCommand("haxe", ["compile-cppia-host.hxml"].concat(args));
|
|
|
- runCommand("haxe", ["compile-cppia.hxml"].concat(args));
|
|
|
- runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
|
|
|
- runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
|
|
|
- }
|
|
|
+ if (testCppia) {
|
|
|
+ runCommand("haxe", ["compile-cppia-host.hxml"].concat(args));
|
|
|
+ runCommand("haxe", ["compile-cppia.hxml"].concat(args));
|
|
|
+ runCpp("bin/cppia/Host-debug", ["bin/unit.cppia"]);
|
|
|
+ runCpp("bin/cppia/Host-debug", ["bin/unit.cppia", "-jit"]);
|
|
|
}
|
|
|
|
|
|
changeDirectory(sysDir);
|