summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob P. Liljenberg <admin@qvantnet.com>2024-02-11 16:21:17 +0100
committerGitHub <noreply@github.com>2024-02-11 16:21:17 +0100
commitcae6c86ecd838ef3d69b2d38656beb9bdd236cbe (patch)
tree15e3afd061e66cb6d24ae43420cc62eb00f001a0
parentbf5618536bf4dc3ac4402c4145d41b9a34f0fd24 (diff)
parent7f5b060b0cbec142158dbfcef1c36ae9670fd648 (diff)
Merge pull request #720 from imwints/fmt-header-only
-rw-r--r--CMakeLists.txt1
-rw-r--r--Makefile2
-rw-r--r--src/btop.cpp1
-rw-r--r--src/btop_tools.hpp4
4 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aec6782..5039cdf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/Makefile b/Makefile
index 30ce82d..9af2aa9 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/src/btop.cpp b/src/btop.cpp
index 736854f..aac8e9c 100644
--- a/src/btop.cpp
+++ b/src/btop.cpp
@@ -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;
diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp
index 766cc95..2502786 100644
--- a/src/btop_tools.hpp
+++ b/src/btop_tools.hpp
@@ -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;