diff --git a/CMakeLists.txt b/CMakeLists.txt index 329c58abc8..d4ba64e503 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,6 @@ option(BUILD_FEX_LINUX_TESTS "Build FEXLinuxTests, requires x86 compiler" FALSE) option(BUILD_THUNKS "Build thunks" FALSE) option(BUILD_FEXCONFIG "Build FEXConfig, requires SDL2 and X11" TRUE) option(ENABLE_CLANG_THUNKS "Build thunks with clang" FALSE) -option(ENABLE_CLANG_FORMAT "Run clang format over the source" FALSE) option(ENABLE_IWYU "Enables include what you use program" FALSE) option(ENABLE_LTO "Enable LTO with compilation" TRUE) option(ENABLE_XRAY "Enable building with LLVM X-Ray" FALSE) @@ -347,57 +346,6 @@ if (ENABLE_IWYU) endif() endif() -if (ENABLE_CLANG_FORMAT) - find_program(CLANG_TIDY_EXE "clang-tidy") - if (NOT CLANG_TIDY_EXE) - message(FATAL_ERROR "Couldn't find clang-tidy") - endif() - - set(CLANG_TIDY_FLAGS - "-checks=*" - "-fuchsia*" - "-bugprone-macro-parentheses" - "-clang-analyzer-core.*" - "-cppcoreguidelines-pro-type-*" - "-cppcoreguidelines-pro-bounds-array-to-pointer-decay" - "-cppcoreguidelines-pro-bounds-pointer-arithmetic" - "-cppcoreguidelines-avoid-c-arrays" - "-cppcoreguidelines-avoid-magic-numbers" - "-cppcoreguidelines-pro-bounds-constant-array-index" - "-cppcoreguidelines-no-malloc" - "-cppcoreguidelines-special-member-functions" - "-cppcoreguidelines-owning-memory" - "-cppcoreguidelines-macro-usage" - "-cppcoreguidelines-avoid-goto" - "-google-readability-function-size" - "-google-readability-namespace-comments" - "-google-readability-braces-around-statements" - "-google-build-using-namespace" - "-hicpp-*" - "-llvm-namespace-comment" - "-llvm-include-order" # Messes up with case sensitivity - "-llvmlibc-*" - "-misc-unused-parameters" - "-modernize-loop-convert" - "-modernize-use-auto" - "-modernize-avoid-c-arrays" - "-modernize-use-nodiscard" - "readability-*" - "-readability-function-size" - "-readability-implicit-bool-conversion" - "-readability-braces-around-statements" - "-readability-else-after-return" - "-readability-magic-numbers" - "-readability-named-parameter" - "-readability-uppercase-literal-suffix" - "-cert-err34-c" - "-cert-err58-cpp" - "-bugprone-exception-escape" - ) - string(REPLACE ";" "," CLANG_TIDY_FLAGS "${CLANG_TIDY_FLAGS}") - set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} "${CLANG_TIDY_FLAGS}") -endif() - add_compile_options(-Wall) configure_file( diff --git a/FEXCore/CMakeLists.txt b/FEXCore/CMakeLists.txt index 8b1f5e3b76..2db0dc60a8 100644 --- a/FEXCore/CMakeLists.txt +++ b/FEXCore/CMakeLists.txt @@ -13,8 +13,6 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64|^arm64|^armv8\.*") set(_M_ARM_64 1) endif() -option(ENABLE_CLANG_FORMAT "Run clang format over the source" FALSE) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) cmake_policy(SET CMP0083 NEW) # Follow new PIE policy include(CheckPIESupported)