From 209ce24b85764371a237192977a29f335063ffa5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Dec 2023 18:38:22 +0100 Subject: [PATCH] Recommend using parallel make when building wxWidgets This should help at least some people spend less time waiting. --- docs/gtk/install.md | 19 +++++++++++++++++-- docs/osx/install.md | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/docs/gtk/install.md b/docs/gtk/install.md index 4e96a10591..039daa6f25 100644 --- a/docs/gtk/install.md +++ b/docs/gtk/install.md @@ -18,13 +18,28 @@ the following in wxWidgets directory: $ cd buildgtk $ ../configure --with-gtk $ make + +It is recommended to use `-jN` option with the last command, where `N` is a +number of the processors in your system (which can be checked using `nproc` +command if you are not sure), as this will dramatically speed up the build +on modern systems. So in practice you should use a command like this: + + $ make -j16 + +You may also prefer to add `-s` option to avoid normal output from make and/or +redirect it you to a log file for further inspection. + + +If you want to install wxWidgets, please also run + $ sudo make install $ sudo ldconfig (if you get "ldconfig: command not found", try using `/sbin/ldconfig`) -If you don't do the `make install` part, you can still use the libraries from -the `buildgtk` directory, but they may not be available to other users. +but note that this part is optional and you can use the libraries from +the `buildgtk` directory by running `.../buildgtk/wx-config` script using its +full path instead of just using `wx-config`. Note that by default, GTK 3 is used. GTK 2 can be specified with `--with-gtk=2` configure option. diff --git a/docs/osx/install.md b/docs/osx/install.md index 2dfb91a3bf..36d00f2e23 100644 --- a/docs/osx/install.md +++ b/docs/osx/install.md @@ -9,11 +9,11 @@ Most OS X developers should start by downloading and installing Xcode from the App Store. It is a free IDE from Apple that provides all of the tools you need for working with wxWidgets. -After Xcode is installed, download wxWidgets-{version}.tar.bz2 and then +After Xcode is installed, download `wxWidgets-{version}.tar.bz2` and then double-click on it to unpack it to create a wxWidgets directory. Next use Terminal (under Applications, Utilities, Terminal) to access a command -prompt. Use cd to change directories to your wxWidgets directory and execute +prompt. Use `cd` to change directories to your wxWidgets directory and execute the following sets of commands from the wxWidgets directory. mkdir build-cocoa-debug @@ -21,6 +21,16 @@ the following sets of commands from the wxWidgets directory. ../configure --enable-debug make +It is recommended to use `-jN` option with the last command, where `N` is a +number of the processors in your system (which can be checked using `sysctl -n +hw.ncpu` command if you are not sure), as this will dramatically speed up the +build on modern systems. So in practice you should use a command like this: + + make -j16 + +You may also prefer to add `-s` option to avoid normal output from make and/or +redirect it you to a log file for further inspection. + Build the samples and demos cd samples; make;cd ..