diff --git a/CMakeLists.txt b/CMakeLists.txt index 11aa026f..9d15675d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(cista-compile-flags -Wall -Wextra) endif() +option(CISTA_FMT "add libfmt support" ON) option(CISTA_ZERO_OUT "zero out fresh memory for valgrind" OFF) option(CISTA_COVERAGE "generate coverage report" OFF) option(CISTA_GENERATE_TO_TUPLE "generate include/cista/reflection/to_tuple.h" OFF) @@ -63,6 +64,9 @@ endif() if (CISTA_USE_MIMALLOC) target_compile_definitions(cista INTERFACE CISTA_USE_MIMALLOC=1) endif() +if (CISTA_FMT) + target_compile_definitions(cista INTERFACE CISTA_FMT) +endif() target_include_directories(cista SYSTEM INTERFACE $ $) diff --git a/include/cista/containers/bitset.h b/include/cista/containers/bitset.h index bc2332f5..bb0447a9 100644 --- a/include/cista/containers/bitset.h +++ b/include/cista/containers/bitset.h @@ -318,7 +318,7 @@ struct bitset { } // namespace cista -#if __has_include("fmt/ostream.h") +#if defined(CISTA_FMT) #include "fmt/ostream.h" diff --git a/include/cista/indexed.h b/include/cista/indexed.h index abd393cc..e234eea2 100644 --- a/include/cista/indexed.h +++ b/include/cista/indexed.h @@ -22,7 +22,7 @@ constexpr bool is_indexed_v = is_indexed_helper>::value; } // namespace cista -#if __has_include("fmt/ostream.h") +#if defined(CISTA_FMT) #include "fmt/ostream.h" diff --git a/include/cista/strong.h b/include/cista/strong.h index b2bfbe8d..17046b8e 100644 --- a/include/cista/strong.h +++ b/include/cista/strong.h @@ -197,7 +197,7 @@ struct hash> { } // namespace std -#if __has_include("fmt/ostream.h") +#if defined(CISTA_FMT) #include "fmt/ostream.h"