Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: workaround _num_cores being 0 under qemu emulation
If you're doing something weird like trying to cross compile bits of ceph using qemu emulation, cmake can think there are zero CPU cores. This is because cmake counts "processor" lines in /proc/cpuinfo, which don't exist when running under qemu-aarch64: # cat /proc/cpuinfo Processor : ARMv7 Processor rev 5 (v7l) BogoMIPS : 799.53 Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x2 CPU part : 0xc08 CPU revision : 5 Hardware : Genesi Efika MX (Smarttop) Revision : 51030 Serial : 0000000000000000 This in turn causes heavy_compile_job_pool to not be set, which later makes the build fail, as that pool is referenced in src/tools/ceph-dencoder/CMakeLists.txt. We can work around the problem by setting _num_cores to 1 in this case. Signed-off-by: Tim Serong <[email protected]>
- Loading branch information