Skip to content

Commit

Permalink
explicit CISTA_FMT flag
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Oct 15, 2024
1 parent a116ae7 commit 0f316f1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand Down
2 changes: 1 addition & 1 deletion include/cista/containers/bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ struct bitset {

} // namespace cista

#if __has_include("fmt/ostream.h")
#if defined(CISTA_FMT)

#include "fmt/ostream.h"

Expand Down
2 changes: 1 addition & 1 deletion include/cista/indexed.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ constexpr bool is_indexed_v = is_indexed_helper<std::remove_cv_t<T>>::value;

} // namespace cista

#if __has_include("fmt/ostream.h")
#if defined(CISTA_FMT)

#include "fmt/ostream.h"

Expand Down
2 changes: 1 addition & 1 deletion include/cista/strong.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ struct hash<cista::strong<T, Tag>> {

} // namespace std

#if __has_include("fmt/ostream.h")
#if defined(CISTA_FMT)

#include "fmt/ostream.h"

Expand Down

0 comments on commit 0f316f1

Please sign in to comment.