Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 14 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,34 @@
cmake_minimum_required(VERSION 3.4.3)
enable_testing()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# require at least gcc 12.0 !!
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
message(FATAL_ERROR "GCC version must be at least 12.0!")
endif()
endif()


if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
project(O2CodeChecker)


# find clang + llvm
find_package(Clang REQUIRED CONFIG)

if( LLVM_FOUND )
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(AddLLVM)
project(O2CodeChecker)

# set the compiler flags to match llvm
include(HandleLLVMOptions)
endif()
# find clang + llvm
find_package(Clang REQUIRED CONFIG)

# Make sure that our source directory is on the current cmake module path so that
# we can include cmake files from this directory.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
if( LLVM_FOUND )
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(AddLLVM)

# include Clang macros (unfortunately they are not part of the cmake installation)
include(AddClang)
# set the compiler flags to match llvm
include(HandleLLVMOptions)
endif()

# add include directories
include_directories(${LLVM_INCLUDE_DIRS})
# Make sure that our source directory is on the current cmake module path so that
# we can include cmake files from this directory.
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")

set(LLVM_LINK_COMPONENTS
Support
)
# include Clang macros (unfortunately they are not part of the cmake installation)
include(AddClang)

# the main executable
add_subdirectory(tool)

# the specific aliceO2 checker code
add_subdirectory(aliceO2)
# the specific reporting tools code
add_subdirectory(reporting)

# plugin
add_subdirectory(plugin)

# for testing
add_subdirectory(test)

# some extra utilities
add_subdirectory(utility)

string(REPLACE "." ";" LLVM_PACKAGE_VERSION_LIST ${LLVM_PACKAGE_VERSION})
list(GET LLVM_PACKAGE_VERSION_LIST 0 LLVM_PACKAGE_VERSION_MAJOR)
install(FILES omp.h DESTINATION lib/clang/${LLVM_PACKAGE_VERSION_MAJOR}/include)

endif()
19 changes: 0 additions & 19 deletions FileExtensionsSet.h

This file was deleted.

66 changes: 0 additions & 66 deletions GlobList.h

This file was deleted.

47 changes: 0 additions & 47 deletions NoLintDirectiveHandler.h

This file was deleted.

31 changes: 15 additions & 16 deletions aliceO2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
set(LLVM_LINK_COMPONENTS support)
add_library(clangTidyAliceO2Module MODULE "")
target_compile_options(clangTidyAliceO2Module PRIVATE -fno-rtti)
target_include_directories(clangTidyAliceO2Module
PRIVATE
${CLANG_INCLUDE_DIRS}
${LLVM_INCLUDE_DIRS}
)

add_clang_library(clangTidyAliceO2Module
AliceO2TidyModule.cpp
MemberNamesCheck.cpp
NamespaceNamingCheck.cpp
SizeofCheck.cpp

LINK_LIBS
clangAST
clangASTMatchers
clangBasic
clangLex
clangTidy
clangTidyUtils
clangTooling
)
target_sources(clangTidyAliceO2Module
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/AliceO2TidyModule.cpp
${CMAKE_CURRENT_LIST_DIR}/MemberNamesCheck.cpp
${CMAKE_CURRENT_LIST_DIR}/NamespaceNamingCheck.cpp
${CMAKE_CURRENT_LIST_DIR}/SizeofCheck.cpp
)
install(TARGETS clangTidyAliceO2Module LIBRARY DESTINATION lib)
10 changes: 0 additions & 10 deletions clang-tidy-config.h

This file was deleted.

Loading