Commit Graph

3 Commits

Author SHA1 Message Date
Zack Cerza
be709462ad cmake: Intelligently set job limits for sccache
If we are correctly configured for distributed mode, use the cluster's CPU count
instead of ours. If we are configured for sccache but without distributed mode,
inform the user but continue with normal job limits.

Signed-off-by: Zack Cerza <zack@redhat.com>
2024-05-06 14:03:14 -06:00
Kefu Chai
7577fec7fd cmake: increase the MAX_{LINK,COMPILE}_MEM
based on recent observation, quite a few C++ source file take
around more than 3.0GiB to compile. for instance,
test_mock_HttpClient.cc could take up to 6270MiB memory to compile.

so increase MAX_{LINK,COMPILE}_MEM accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-03 21:03:03 +08:00
Kefu Chai
897fd990bf cmake: use ninja job pool
to limit the parallel level of compile jobs which consumes lots of memory
to compile and/or link.

compile following targets with heavy_compile_pool.

* unittest_librbd
* crimson*
* ceph-dencoder

some of the .cc files in the target above use up to 6 GiB memory to
compile.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-21 15:52:13 +08:00