]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: unset all cxx flags before testing cxx_atomics
authorKefu Chai <tchaikov@gmail.com>
Tue, 19 Jul 2022 04:54:25 +0000 (12:54 +0800)
committerJustin Caratzas <jcaratza@redhat.com>
Fri, 16 Sep 2022 18:54:54 +0000 (14:54 -0400)
commite62b1bbc4b540008dc6404761439124b9cedc6ef
tree8b523dba0055f80c07ef629e193481730b446db4
parent2ecc00cbd20c46a9574c1e2a54d5266820811c66
cmake: unset all cxx flags before testing cxx_atomics

so we are immune to the flags set by the flags set by user. please
note, neither CFLAGS nor CXXFLAGS is populated to the
`check_cxx_source_compiles()` function. so this change is not related
to LTO optimization which is implemented using `_lto_cflags`, which
is added to CFLAGS and CXXFLAGS, as part of `__global_compiler_flags`.

See-also: https://tracker.ceph.com/issues/54514
See-also: https://tracker.ceph.com/issues/56492
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
cmake/modules/CheckCxxAtomic.cmake