Skip to content

Commit

Permalink
update clang-format
Browse files Browse the repository at this point in the history
and change whitespace, I wish this was unnecessary
  • Loading branch information
joelsmithTT committed Nov 9, 2024
1 parent a0aeb6a commit 3046a45
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
14 changes: 11 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ BasedOnStyle: Google
ColumnLimit: 120
IndentWidth: 4

DerivePointerAlignment: false
PointerAlignment: Left
ReferenceAlignment: Left

# This will make access modifiers (public/protected/private) sit on the same indentation as `class` keyword
AccessModifierOffset: -4

Expand All @@ -15,12 +19,16 @@ AlignAfterOpenBracket: AlwaysBreak
BinPackArguments: false
BinPackParameters: false

# When constructor initializers exist in the constructor definition, leave the colon as last thing on the original
# line instead of putting it on the next line.
BreakConstructorInitializers: AfterColon

# Disallow single statements after if/else/for/while/do without curly braces.
InsertBraces: true

# Separate definition blocks, including classes, structs, enums, and functions.
SeparateDefinitionBlocks: Always

# Line up : and , in ctor init list
AllowShortFunctionsOnASingleLine: false
BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: false

InsertNewlineAtEOF: true
7 changes: 1 addition & 6 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ function(fetch_dependencies)
####################################################################################################################
# spdlog
####################################################################################################################
CPMAddPackage(
NAME spdlog
GITHUB_REPOSITORY gabime/spdlog
GIT_TAG v1.14.1
VERSION v1.14.1
)
CPMAddPackage(NAME spdlog GITHUB_REPOSITORY gabime/spdlog GIT_TAG v1.14.1 VERSION v1.14.1)
endfunction()
fetch_dependencies()
2 changes: 1 addition & 1 deletion common/logger_.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ namespace detail {
std::atomic_bool is_initialized = false;
}

} // namespace tt::umd::logger
} // namespace tt::umd::logger
2 changes: 1 addition & 1 deletion device/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(UMD_DEVICE_SRCS
wormhole/wormhole_coordinate_manager.cpp
pcie/pci_device.cpp
hugepage.cpp
../common/logger_.cpp # ../common looks a bit strange
../common/logger_.cpp # ../common looks a bit strange
)

add_library(device SHARED ${UMD_DEVICE_SRCS})
Expand Down
11 changes: 7 additions & 4 deletions tests/misc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
set(MISC_TESTS_SRCS
test_logger.cpp
)
set(MISC_TESTS_SRCS test_logger.cpp)

add_executable(misc_tests ${MISC_TESTS_SRCS})
target_link_libraries(misc_tests PRIVATE test_common spdlog::spdlog_header_only)
target_link_libraries(
misc_tests
PRIVATE
test_common
spdlog::spdlog_header_only
)
set_target_properties(
misc_tests
PROPERTIES
Expand Down
3 changes: 2 additions & 1 deletion tests/misc/test_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,5 @@ TEST_F(LoggerTest, StderrAndDiskPerformance) {
}
std::cout << ts.to_string() << " for " << num_messages << " messages below level threshold" << std::endl;
}
}
}

0 comments on commit 3046a45

Please sign in to comment.