From a87e8bb39f8548f1418a5f68353c9fca890ba5df Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 6 Apr 2021 17:53:16 -0400 Subject: [PATCH] Set fmt defines in CMake --- extern/CMakeLists.txt | 6 ++++++ include/athena/Global.hpp | 2 -- src/athena/Global.cpp | 6 ------ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 7f6ae41..b497fbb 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -6,4 +6,10 @@ add_subdirectory(zlib) add_subdirectory(yaml) if(NOT TARGET fmt) add_subdirectory(fmt) + target_compile_definitions(fmt PUBLIC + FMT_STRING_ALIAS=1 + FMT_ARM_ABI_COMPATIBILITY=1 + FMT_EXCEPTIONS=0) + target_compile_definitions(fmt INTERFACE + FMT_ENFORCE_COMPILE_STRING=1) endif() \ No newline at end of file diff --git a/include/athena/Global.hpp b/include/athena/Global.hpp index 57eceaa..437d59b 100644 --- a/include/athena/Global.hpp +++ b/include/athena/Global.hpp @@ -3,8 +3,6 @@ #include #include "athena/Types.hpp" -#define FMT_STRING_ALIAS 1 -#define FMT_ENFORCE_COMPILE_STRING 1 #include #ifdef _MSC_VER diff --git a/src/athena/Global.cpp b/src/athena/Global.cpp index 60937c9..8a9c565 100644 --- a/src/athena/Global.cpp +++ b/src/athena/Global.cpp @@ -1,13 +1,7 @@ #include "athena/Global.hpp" #include "athena/Utility.hpp" -#include -#include #include -#define FMT_STRING_ALIAS 1 -#define FMT_ENFORCE_COMPILE_STRING 1 -#include - std::ostream& operator<<(std::ostream& os, const athena::SeekOrigin& origin) { switch (origin) { case athena::SeekOrigin::Begin: