Skip to content

Commit

Permalink
[C++] Enable asserts during tests and use parallelism based on availa…
Browse files Browse the repository at this point in the history
…ble resources

Signed-off-by: Justin King <jcking@google.com>
  • Loading branch information
jcking committed Apr 11, 2022
1 parent 6b2e44b commit 67b23a5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private boolean buildRuntime() {
System.out.println("Building ANTLR4 C++ runtime (if necessary) at "+ runtimePath);

try {
String[] command = { "cmake", ".", /*"-DCMAKE_CXX_COMPILER=clang++",*/ "-DCMAKE_BUILD_TYPE=release" };
String[] command = { "cmake", ".", "-DCMAKE_BUILD_TYPE=debug" };
if (runCommand(command, runtimePath, "antlr runtime cmake", false) == null) {
return false;
}
Expand All @@ -224,7 +224,7 @@ private boolean buildRuntime() {
}

try {
String[] command = { "make", "-j", "8" }; // Assuming a reasonable amount of available CPU cores.
String[] command = { "make", "-j", Integer.toString(Runtime.getRuntime().availableProcessors()) }; // Assuming a reasonable amount of available CPU cores.
if (runCommand(command, runtimePath, "building antlr runtime", true) == null)
return false;
}
Expand Down

0 comments on commit 67b23a5

Please sign in to comment.