build: use parallelization except on Windows#17
Conversation
ReenigneArcher
left a comment
There was a problem hiding this comment.
Thank you again! Just a couple of suggestions below.
I don't remember if there's a way to set a default value if the env value is empty or not. If NOT the env value also needs to be set before we run this command.
doxyconfig/readthedocs_build.sh
Line 60 in 4c05198
The build in readthedocs does not use cmake, since it would require installing all the project dependencies and such, wasting a lot of time.
This is similar to LizardByte/Sunshine#3361, except now multithreaded processing is not used on Windows. Unlike LizardByte/Sunshine#3361, we're now enabling parallelization for both dot graph generation and other doxygen processing tasks as well (except on Windows). To check for Windows, we use the macro `CMAKE_HOST_WIN32` rather than the more well-known `WIN32`, because what matters here is the host platform, not the target platform. In most cases, these will be the same, but the issue with parallelization is related to Windows as a host, not a target. In other words, using Windows to build the documentation for a macOS project should still be single-threaded.
|
I can't find any way to set a default value in the doxygen config file. However, if the environment variable is blank, that doesn't cause a syntax error. Instead, it's equivalent to setting a blank value for the variable. This in turn causes the default value for the variable to be used. This is fine for our case because it means that multithreading will be enabled by default, unless disabled by the cmake variable. Your |



This is similar to LizardByte/Sunshine#3361, except now multithreaded
processing is not used on Windows.
Unlike LizardByte/Sunshine#3361, we're now enabling parallelization
for both dot graph generation and other doxygen processing tasks as well
(except on Windows).
To check for Windows, we use the macro
CMAKE_HOST_WIN32rather thanthe more well-known
WIN32, because what matters here is the hostplatform, not the target platform. In most cases, these will be the
same, but the issue with parallelization is related to Windows as a
host, not a target. In other words, using Windows to build the
documentation for a macOS project should still be single-threaded.
Type of Change
.github/...)Checklist