cmake: silence useless compiler warnings triggered by the FASTBuild generator#20230
Closed
vszakats wants to merge 1 commit intocurl:masterfrom
Closed
cmake: silence useless compiler warnings triggered by the FASTBuild generator#20230vszakats wants to merge 1 commit intocurl:masterfrom
vszakats wants to merge 1 commit intocurl:masterfrom
Conversation
To silence many of these warnings:
```
11>/tmp/_fbuild.tmp/0x0752c383/core_2/70816E19/krb5_sspi.c:1:5: error: this style of line directive is a GNU extension [-Werror,-Wgnu-line-marker]
1 | # 1 "<built-in>"
| ^
/path/to/curl/lib/vauth/krb5_sspi.c:29:6: error: this style of line directive is a GNU extension [-Werror,-Wgnu-line-marker]
29 | # 26 "/path/to/curl/lib/vauth/krb5_sspi.c"
| ^
```
FASTBuild is slightly faster than Ninja in basic (single-machine, build
from scratch) cases. It doesn't support unity builds. Maybe it can bring
slightly better performance to non-unity cmake jobs, in jobs having
an 'install prereq' phase, and installing the fastbuild package is
faster than this gain. It overall seems marginal if any in curl CI.
At least for now. But it doesn't hurt if it works, and may be useful for
some.
Requires CMake 4.2+.
Refs:
https://www.kitware.com/cmake-fastbuild-distributed-cached-and-fast/
https://cmake.org/cmake/help/latest/generator/FASTBuild.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Silencing all of these:
FASTBuild is slightly faster than Ninja in basic (single-machine, build
from scratch) cases (and can be more faster in other build cases). It
doesn't support unity builds. Maybe it can bring slightly better
performance to non-unity cmake CI jobs, in jobs having an 'install
prereq' phase already, and installing the fastbuild package being faster
than this gain. It overall seems marginal if any in curl CI. At least
for now. But it doesn't hurt if it works, and may be useful for some.
Requires CMake 4.2+.
That said this workaround may have a better place within CMake.
Refs:
https://www.kitware.com/cmake-fastbuild-distributed-cached-and-fast/
https://cmake.org/cmake/help/latest/generator/FASTBuild.html
https://github.com/fastbuild/fastbuild
https://fastbuild.org/docs/home.html