Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbowen42 committed Nov 5, 2024
1 parent cef8407 commit b360207
Show file tree
Hide file tree
Showing 32 changed files with 529 additions and 572 deletions.
5 changes: 3 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BraceWrapping:
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeLambdaBody: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
Expand All @@ -40,12 +40,13 @@ BraceWrapping:
# Pointer alignment
DerivePointerAlignment: false
PointerAlignment: Left

# Single line config
AllowShortIfStatementsOnASingleLine : true
AllowShortFunctionsOnASingleLine : true
AllowShortLoopsOnASingleLine : false
AllowAllArgumentsOnNextLine : true
AllowAllParametersOfDeclarationOnNextLine : false
AlignTrailingComments : true
BinPackArguments : true
BinPackParameters : false
ConstructorInitializerAllOnOneLineOrOnePerLine : true
Expand Down
15 changes: 3 additions & 12 deletions cmake/RAJAMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ endmacro(raja_add_benchmark)
## raja_add_code_checks()
##
## Adds code checks for all source files recursively in the RAJA repository.
##
##
## This creates the following parent build targets:
## check - Runs a non file changing style check and CppCheck
## style - In-place code formatting
Expand All @@ -233,7 +233,7 @@ macro(raja_add_code_checks)
if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Create file globbing expressions that only include directories that contain source
# TODO(bowen) Add examples, exercises and benchmark to the list below
set(_base_dirs "RAJA" "examples" "exercises" "benchmark" "include" "src" "test")
set(_base_dirs "RAJA" "benchmark" "include" "src" "test")
set(_ext_expressions "*.cpp" "*.hpp" "*.inl"
"*.cxx" "*.hxx" "*.cc" "*.c" "*.h" "*.hh")

Expand All @@ -248,15 +248,6 @@ macro(raja_add_code_checks)
set(_sources)
file(GLOB_RECURSE _sources ${_glob_expressions})

# Filter out exclusions
#set(_exclude_expressions
# "${PROJECT_SOURCE_DIR}/axom/sidre/examples/lulesh2/*"
# "${PROJECT_SOURCE_DIR}/axom/slam/examples/lulesh2.0.3/*"
# "${PROJECT_SOURCE_DIR}/axom/slam/examples/tinyHydro/*")
#foreach(_exp ${_exclude_expressions})
# list(FILTER _sources EXCLUDE REGEX ${_exp})
#endforeach()
#
blt_add_code_checks(PREFIX RAJA
SOURCES ${_sources}
CLANGFORMAT_CFG_FILE ${PROJECT_SOURCE_DIR}/.clang-format
Expand All @@ -265,7 +256,7 @@ macro(raja_add_code_checks)
# Set FOLDER property for code check targets
foreach(_suffix clangformat_check clangformat_style clang_tidy_check clang_tidy_style)
set(_tgt ${arg_PREFIX}_${_suffix})
if(TARGET ${_tgt})
if(TARGET ${_tgt})
set_target_properties(${_tgt} PROPERTIES FOLDER "RAJA/code_checks")
endif()
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion include/RAJA/pattern/launch/launch_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "camp/tuple.hpp"

// Odd dependecy with atomics is breaking CI builds
//#include "RAJA/util/View.hpp"
// #include "RAJA/util/View.hpp"

#if defined(RAJA_GPU_DEVICE_COMPILE_PASS_ACTIVE) && !defined(RAJA_ENABLE_SYCL)
#define RAJA_TEAM_SHARED __shared__
Expand Down
Loading

0 comments on commit b360207

Please sign in to comment.