summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:07:28 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-12-15 01:57:05 +0100
commit1c7892a70dfb9e5757321284220e4b4b65423409 (patch)
treefa435307e435626ffab1aa5ae8111907cbf4cf93 /CMakeLists.txt
parent6106e26de2058efee1dd4a63734ad9d05458958a (diff)
CMake: Add support for running clang-tidy on mixxx only
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8dcb1ff3e..0652b2026a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,6 +331,8 @@ if(CMAKE_VERSION VERSION_LESS "3.7.0")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
endif()
+set(CLANG_TIDY "" CACHE STRING "CMAKE_CXX_CLANG_TIDY equivalent that only applies to mixxx sources, not bundled dependencies")
+
# Mixxx itself
add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/analyzer/analyzerbeats.cpp
@@ -922,7 +924,7 @@ add_library(mixxx-lib STATIC EXCLUDE_FROM_ALL
src/widget/wwidgetgroup.cpp
src/widget/wwidgetstack.cpp
)
-set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON)
+set_target_properties(mixxx-lib PROPERTIES AUTOMOC ON AUTOUIC ON CXX_CLANG_TIDY "${CLANG_TIDY}")
target_include_directories(mixxx-lib PUBLIC src "${CMAKE_CURRENT_BINARY_DIR}/src")
target_compile_definitions(mixxx-lib PRIVATE SETTINGS_FILE="mixxx.cfg")
if(UNIX AND NOT APPLE)
@@ -1088,6 +1090,7 @@ endif()
# The mixxx executable
add_executable(mixxx WIN32 src/main.cpp)
+set_target_properties(mixxx-lib PROPERTIES CXX_CLANG_TIDY "${CLANG_TIDY}")
target_link_libraries(mixxx PUBLIC mixxx-lib)
#