Skip to content

Commit

Permalink
Organize spdlog imports and fix fmt symbol issue.
Browse files Browse the repository at this point in the history
Reorganize spdlog headers in CSVWriter.h and remove unused imports in other files to clean up code dependencies. Add a compile definition in CMakeLists.txt to resolve missing fmt symbols.
  • Loading branch information
schuhmaj committed Nov 28, 2024
1 parent abe2c43 commit 62323b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ IF(_LIBCPP_DISABLE_AVAILABILITY)
add_definitions(-D_LIBCPP_DISABLE_AVAILABILITY)
endif ()

# Resolves missing fmt symbols when working with spdlog (bundled via brew/ conda on Arm architecture)
# Refer to https://github.com/gabime/spdlog/issues/660
add_compile_definitions(FMT_HEADER_ONLY)

#######################################################
# Including dependencies needed across multiple targets
#######################################################
Expand Down
1 change: 0 additions & 1 deletion src/polyhedralGravity/model/GravityModelDetail.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <algorithm>
#include <variant>

#include "spdlog/spdlog.h"
#include "thrust/iterator/zip_iterator.h"
#include "thrust/iterator/transform_iterator.h"
#include "thrust/iterator/counting_iterator.h"
Expand Down
2 changes: 1 addition & 1 deletion src/polyhedralGravity/output/CSVWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <utility>
#include <memory>
#include "polyhedralGravity/model/GravityModelData.h"
#include "spdlog/spdlog.h"
#include "spdlog/sinks/basic_file_sink.h"
#include "spdlog/fmt/ostr.h"
#include "spdlog/spdlog.h"

namespace polyhedralGravity {

Expand Down
1 change: 0 additions & 1 deletion test/model/GravityModelVectorUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "polyhedralGravity/model/GravityModelData.h"
#include "polyhedralGravity/util/UtilityConstants.h"
#include "polyhedralGravity/util/UtilityContainer.h"
#include "spdlog/spdlog.h"
#include "thrust/iterator/zip_iterator.h"
#include "thrust/iterator/transform_iterator.h"
#include "thrust/iterator/counting_iterator.h"
Expand Down

0 comments on commit 62323b9

Please sign in to comment.