From 5dc8a0808ef102e06254bdde8540d22ef0fff4b2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 27 Nov 2016 18:31:21 +0100 Subject: [PATCH] Maybe the Travis CI server has more than 16 cores? --- lib/Slic3r/Config.pm | 2 +- xs/src/libslic3r/PrintConfig.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/Config.pm b/lib/Slic3r/Config.pm index fe766e5fd..c315f9b4e 100644 --- a/lib/Slic3r/Config.pm +++ b/lib/Slic3r/Config.pm @@ -218,7 +218,7 @@ sub validate { my $self = shift; # -j, --threads - die "Invalid value for --threads: " . $self->threads . "\n" + die "Invalid value for --threads\n" if $self->threads < 1; # --layer-height diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 745976d46..746cf7f1d 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1291,11 +1291,9 @@ PrintConfigDef::PrintConfigDef() def->cli = "threads|j=i"; def->readonly = true; def->min = 1; - def->max = 16; { unsigned int threads = boost::thread::hardware_concurrency(); - if (threads == 0) threads = 2; - def->default_value = new ConfigOptionInt(threads); + def->default_value = new ConfigOptionInt(threads > 0 ? threads : 2); } def = this->add("toolchange_gcode", coString);