Skip to content

Commit

Permalink
Merge pull request #720 from imwints/fmt-header-only
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos authored Feb 11, 2024
2 parents bf56185 + 7f5b060 commit cae6c86
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ if(HAS_FCF_PROTECTION)
endif()

target_compile_definitions(btop PRIVATE
FMT_HEADER_ONLY
_FILE_OFFSET_BITS=64
$<$<CONFIG:Debug>:_GLIBCXX_ASSERTIONS _LIBCPP_ENABLE_ASSERTIONS=1>
# Only has an effect with optimizations enabled
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main
override REQFLAGS := -std=c++20
WARNFLAGS := -Wall -Wextra -pedantic
OPTFLAGS := -O2 -ftree-vectorize -flto=$(LTO)
LDCXXFLAGS := -pthread -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
LDCXXFLAGS := -pthread -DFMT_HEADER_ONLY -D_GLIBCXX_ASSERTIONS -D_FILE_OFFSET_BITS=64 $(GOODFLAGS) $(ADDFLAGS)
override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS)
INC := $(foreach incdir,$(INCDIRS),-isystem $(incdir)) -I$(SRCDIR)
Expand Down
1 change: 1 addition & 0 deletions src/btop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ tab-size = 4
#include "btop_draw.hpp"
#include "btop_menu.hpp"
#include "fmt/core.h"
#include "fmt/ostream.h"

using std::atomic;
using std::cout;
Expand Down
4 changes: 1 addition & 3 deletions src/btop_tools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,9 @@ tab-size = 4
#define HOST_NAME_MAX 64
#endif
#endif
#define FMT_HEADER_ONLY

#include "fmt/core.h"
#include "fmt/format.h"
#include "fmt/ostream.h"
#include "fmt/ranges.h"

using std::array;
using std::atomic;
Expand Down

0 comments on commit cae6c86

Please sign in to comment.