diff --git a/CMakeLists.txt b/CMakeLists.txt index 43a00e68f19b..4f3cdb3fd987 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -288,6 +288,7 @@ if (FMT_MODULE) endif () if (FMT_OS) target_sources(fmt PRIVATE src/os.cc) +else() target_compile_definitions(fmt PRIVATE FMT_OS=0) endif () diff --git a/src/fmt.cc b/src/fmt.cc index b3d344c61a77..6cff309d41c6 100644 --- a/src/fmt.cc +++ b/src/fmt.cc @@ -113,4 +113,4 @@ module :private; #include "format.cc" #if FMT_OS # include "os.cc" -#endif \ No newline at end of file +#endif