diff options
Diffstat (limited to 'intern/cycles/app')
-rw-r--r-- | intern/cycles/app/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/cycles/app/cycles_server.cpp | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt index ada5ea55fb2..8a81ddde1e1 100644 --- a/intern/cycles/app/CMakeLists.txt +++ b/intern/cycles/app/CMakeLists.txt @@ -30,6 +30,10 @@ set(LIBRARIES ${TIFF_LIBRARY} ) +if(UNIX) + list(APPEND LIBRARIES dl) +endif() + if(WIN32) list(APPEND LIBRARIES ${PTHREADS_LIBRARIES}) endif() diff --git a/intern/cycles/app/cycles_server.cpp b/intern/cycles/app/cycles_server.cpp index e80fc0cb95f..f4cacb2d001 100644 --- a/intern/cycles/app/cycles_server.cpp +++ b/intern/cycles/app/cycles_server.cpp @@ -35,6 +35,7 @@ int main(int argc, const char **argv) string devicelist = ""; string devicename = "cpu"; bool list = false; + int threads = 0; vector<DeviceType>& types = Device::available_types(); @@ -51,6 +52,7 @@ int main(int argc, const char **argv) ap.options ("Usage: cycles_server [options]", "--device %s", &devicename, ("Devices to use: " + devicelist).c_str(), "--list-devices", &list, "List information about all available devices", + "--threads %d", &threads, "Number of threads to use for CPU device", NULL); if(ap.parse(argc, argv) < 0) { @@ -84,11 +86,11 @@ int main(int argc, const char **argv) } } - TaskScheduler::init(); + TaskScheduler::init(threads); while(1) { Stats stats; - Device *device = Device::create(device_info, stats); + Device *device = Device::create(device_info, stats, true); printf("Cycles Server with device: %s\n", device->info.description.c_str()); device->server_run(); delete device; |