2023-08-15 14:20:26 +00:00
|
|
|
# SPDX-FileCopyrightText: 2006 Blender Authors
|
2023-05-31 14:19:06 +00:00
|
|
|
#
|
2022-02-10 22:07:11 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2006-11-17 02:27:12 +00:00
|
|
|
|
2017-04-08 02:00:46 +00:00
|
|
|
if(WITH_LEGACY_OPENGL)
|
2019-04-17 04:17:24 +00:00
|
|
|
add_definitions(-DWITH_LEGACY_OPENGL)
|
2017-04-08 02:00:46 +00:00
|
|
|
endif()
|
|
|
|
|
2020-12-03 18:00:58 +00:00
|
|
|
if(WITH_CLANG_TIDY AND NOT MSVC)
|
2020-06-05 09:37:49 +00:00
|
|
|
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2020-07-03 08:56:10 +00:00
|
|
|
message(WARNING "Currently Clang-Tidy might fail with GCC toolchain, switch to Clang toolchain if that happens")
|
2022-01-13 16:47:14 +00:00
|
|
|
if(COMMAND target_precompile_headers)
|
|
|
|
message(STATUS "Clang-Tidy and GCC precompiled headers are incompatible, disabling precompiled headers")
|
2022-01-28 03:08:11 +00:00
|
|
|
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
|
2022-01-13 16:47:14 +00:00
|
|
|
endif()
|
2020-06-05 09:37:49 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(ClangTidy REQUIRED)
|
2022-05-06 13:21:54 +00:00
|
|
|
set(CMAKE_C_CLANG_TIDY
|
|
|
|
${CLANG_TIDY_EXECUTABLE};--extra-arg=-Wno-error=unknown-warning-option)
|
|
|
|
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXECUTABLE};--extra-arg=-Wno-error=unknown-warning-option)
|
2020-06-05 09:37:49 +00:00
|
|
|
endif()
|
|
|
|
|
2010-12-08 08:43:06 +00:00
|
|
|
add_subdirectory(blender)
|