Skip to content

ci: drop cmake --parallel - #884

Merged
vszakats merged 1 commit into
libssh2:masterfrom
vszakats:cmake-drop-parallel
Mar 27, 2023
Merged

vszakats merged 1 commit into
libssh2:masterfrom
vszakats:cmake-drop-parallel

Conversation

@vszakats

@vszakats vszakats commented Mar 27, 2023 •

Copy link
Copy Markdown
Member

--parallel 2 did not seem to make builds faster. Neither did 4 or 6.

Delete this option from both GHA and AppVeyor jobs.

On AppVeyor, with VS, it uses MSBuild under the hood where apparently
--parallel doesn't help [1]. The suggested MSBuild-specific option
/p:CL_MPcount=2 did not improve build times either.

CMake spends significant time (comparable to building the project
itself) on feature detection, it'd be nice to execute those in parallel,
but I found not such CMake option.

[1] https://discourse.cmake.org/t/parallel-does-not-really-enable-parallel-compiles-with-msbuild/964

Partial revert of 7a039d9

@vszakats
vszakats force-pushed the cmake-drop-parallel branch from f7ca9ad to a90e922 Compare March 27, 2023 13:51
`--parallel 2` did not seem to make builds faster. Neither did 4 or 6.

Delete this option from both GHA and AppVeyor jobs.

On AppVeyor, with VS, it uses MSBuild under the hood where apparently
`--parallel` doesn't do much [1]. The suggested MSBuild-specific option
`/p:CL_MPcount=2` did not improve build times either.

CMake spends significant time (comparable to building the project
itself) on feature detection, it'd be nice to execute those in parallel,
but I found not such CMake option.

[1] https://discourse.cmake.org/t/parallel-does-not-really-enable-parallel-compiles-with-msbuild/964

Partial revert of 7a039d9
@vszakats
vszakats force-pushed the cmake-drop-parallel branch from a90e922 to 38b14d7 Compare March 27, 2023 14:26
@vszakats vszakats changed the title ci: drop --parallel from cmake ci: drop cmake --parallel Mar 27, 2023
@vszakats
vszakats merged commit 0d08974 into libssh2:master Mar 27, 2023
vszakats added a commit that referenced this pull request Dec 21, 2023
The comment cited earlier is no longer true with recent CMake versions.
This options does actually enable parallel builds with MSVC since CMake
v3.26.0: https://gitlab.kitware.com/cmake/cmake/-/issues/20564

The effect isn't much for libssh2, because it spends most time in tests,
but let's enable it anyway for efficiency.

Ref: 0d08974 #884
Ref: 7a039d9 #867

Closes #1294
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
`--parallel 2` did not seem to make builds faster. Neither did 4 or 6.

Delete this option from both GHA and AppVeyor jobs.

On AppVeyor, with VS, it uses MSBuild under the hood where apparently
`--parallel` doesn't do much [1]. The suggested MSBuild-specific option
`/p:CL_MPcount=2` did not improve build times either.

CMake spends significant time (comparable to building the project
itself) on feature detection, it'd be nice to execute those in parallel,
but I found not such CMake option.

[1] https://discourse.cmake.org/t/parallel-does-not-really-enable-parallel-compiles-with-msbuild/964

Partial revert of 7a039d9
agreppin pushed a commit to agreppin/libssh2 that referenced this pull request Jul 14, 2024
The comment cited earlier is no longer true with recent CMake versions.
This options does actually enable parallel builds with MSVC since CMake
v3.26.0: https://gitlab.kitware.com/cmake/cmake/-/issues/20564

The effect isn't much for libssh2, because it spends most time in tests,
but let's enable it anyway for efficiency.

Ref: 0d08974 libssh2#884
Ref: 7a039d9 libssh2#867

Closes libssh2#1294
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant