diff options
author | Lucian Petrut <lpetrut@cloudbasesolutions.com> | 2023-07-28 13:27:56 +0200 |
---|---|---|
committer | Lucian Petrut <lpetrut@cloudbasesolutions.com> | 2023-07-28 16:34:37 +0200 |
commit | 5fd67e1f88ff86cd3280b47bf99a40f572045bb4 (patch) | |
tree | 6e93458b9c2ac15a59723263292f1f964c4fcbde /CMakeLists.txt | |
parent | Merge pull request #52671 from zdover23/wip-doc-2023-07-27-readmemd-2-of-x (diff) | |
download | ceph-5fd67e1f88ff86cd3280b47bf99a40f572045bb4.tar.xz ceph-5fd67e1f88ff86cd3280b47bf99a40f572045bb4.zip |
build: globally set FMT_USE_TZSET=0 for Windows
We're currently setting FMT_USE_TZSET=0 when building libfmt
in order to avoid the _tzset function, which is unavailable
under Mingw:
https://github.com/ceph/ceph/commit/aa5769ecf1d80fc9824280d2e90fd4c61a0e7769
The issue is that it still gets used by fmt/chrono.h, which is
why we'll move this definition to the top level cmake file.
Note that the Windows build is currently failing as a result of
a recent change: https://github.com/ceph/ceph/pull/52590/files
In file included from ceph/src/common/ceph_time.h:22,
from ceph/src/include/encoding.h:31,
from ceph/src/include/uuid.h:9,
from ceph/src/include/types.h:21,
from ceph/src/crush/CrushWrapper.h:14,
from ceph/src/crush/CrushCompiler.h:7,
from ceph/src/crush/CrushCompiler.cc:4:
ceph/src/fmt/include/fmt/chrono.h: In lambda function:
ceph/src/fmt/include/fmt/chrono.h:953:5: error: ‘_tzset’ was
not declared in this scope; did you mean ‘tzset’?
953 | _tzset();
| ^~~~~~
| tzset
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2852a7488ac..1778a720264 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ if(WIN32) # https://github.com/msys2/MINGW-packages/issues/3319 add_definitions( -D_WIN32_WINNT=${WIN32_WINNT} + -DFMT_USE_TZSET=0 -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -DBOOST_THREAD_V2_SHARED_MUTEX ) |