Files
TheRock/compiler/amd-llvm/clang/lib/Format/CMakeLists.txt
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

89 lines
2.7 KiB
CMake

set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangFormat
AffectedRangeManager.cpp
BreakableToken.cpp
ContinuationIndenter.cpp
DefinitionBlockSeparator.cpp
Format.cpp
FormatToken.cpp
FormatTokenLexer.cpp
IntegerLiteralSeparatorFixer.cpp
MacroCallReconstructor.cpp
MacroExpander.cpp
MatchFilePath.cpp
NamespaceEndCommentsFixer.cpp
NumericLiteralCaseFixer.cpp
NumericLiteralInfo.cpp
ObjCPropertyAttributeOrderFixer.cpp
QualifierAlignmentFixer.cpp
SortJavaScriptImports.cpp
TokenAnalyzer.cpp
TokenAnnotator.cpp
UnwrappedLineFormatter.cpp
UnwrappedLineParser.cpp
UsingDeclarationsSorter.cpp
WhitespaceManager.cpp
LINK_LIBS
clangBasic
clangLex
clangToolingCore
clangToolingInclusions
)
file(GLOB_RECURSE files
*.cpp
*.h
${CLANG_SOURCE_DIR}/include/clang/Format/*.h
${CLANG_SOURCE_DIR}/tools/clang-format/*.cpp
${CLANG_SOURCE_DIR}/unittests/Format/*.cpp
${CLANG_SOURCE_DIR}/unittests/Format/*.h
)
set(check_format_depends)
set(i 0)
foreach(file IN LISTS files)
add_custom_command(OUTPUT check_format_depend_${i}
COMMAND clang-format ${file} | diff -u ${file} -
VERBATIM
COMMENT "Checking format of ${file}"
)
list(APPEND check_format_depends check_format_depend_${i})
math(EXPR i ${i}+1)
endforeach()
add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})
set(docs_tools_dir ${CLANG_SOURCE_DIR}/docs/tools)
set(format_style_depend ${CMAKE_CURRENT_BINARY_DIR}/format_style_depend)
set(dump_style dump_format_style.py)
set(style_options_rst ${CLANG_SOURCE_DIR}/docs/ClangFormatStyleOptions.rst)
add_custom_command(OUTPUT ${format_style_depend}
COMMAND ${Python3_EXECUTABLE} ${dump_style} && touch ${format_style_depend}
WORKING_DIRECTORY ${docs_tools_dir}
VERBATIM
COMMENT "Updating ${style_options_rst}"
DEPENDS ${CLANG_SOURCE_DIR}/include/clang/Format/Format.h
${CLANG_SOURCE_DIR}/include/clang/Tooling/Inclusions/IncludeStyle.h
${style_options_rst}
${docs_tools_dir}/plurals.txt
${docs_tools_dir}/${dump_style}
)
add_custom_target(clang-format-style DEPENDS ${format_style_depend})
set(format_help_depend ${CMAKE_CURRENT_BINARY_DIR}/format_help_depend)
set(dump_help dump_format_help.py)
set(clang_format_rst ${CLANG_SOURCE_DIR}/docs/ClangFormat.rst)
add_custom_command(OUTPUT ${format_help_depend}
COMMAND ${Python3_EXECUTABLE} ${dump_help} -d ${CMAKE_BINARY_DIR}/bin &&
touch ${format_help_depend}
WORKING_DIRECTORY ${docs_tools_dir}
VERBATIM
COMMENT "Updating ${clang_format_rst}"
DEPENDS clang-format
${clang_format_rst}
${docs_tools_dir}/${dump_help}
)
add_custom_target(clang-format-help DEPENDS ${format_help_depend})