diff options
Diffstat (limited to 'build_files/cmake/Modules')
-rw-r--r-- | build_files/cmake/Modules/FindClangTidy.cmake | 2 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindHaru.cmake | 64 | ||||
-rw-r--r-- | build_files/cmake/Modules/GTestTesting.cmake | 4 |
3 files changed, 69 insertions, 1 deletions
diff --git a/build_files/cmake/Modules/FindClangTidy.cmake b/build_files/cmake/Modules/FindClangTidy.cmake index 04c5dfda448..4cf416e67d7 100644 --- a/build_files/cmake/Modules/FindClangTidy.cmake +++ b/build_files/cmake/Modules/FindClangTidy.cmake @@ -34,6 +34,8 @@ set(_clang_tidy_SEARCH_DIRS # TODO(sergey): Find more reliable way of finding the latest clang-tidy. find_program(CLANG_TIDY_EXECUTABLE NAMES + clang-tidy-12 + clang-tidy-11 clang-tidy-10 clang-tidy-9 clang-tidy-8 diff --git a/build_files/cmake/Modules/FindHaru.cmake b/build_files/cmake/Modules/FindHaru.cmake new file mode 100644 index 00000000000..5774f83b8c5 --- /dev/null +++ b/build_files/cmake/Modules/FindHaru.cmake @@ -0,0 +1,64 @@ +# - Find HARU library +# Find the native Haru includes and library +# This module defines +# HARU_INCLUDE_DIRS, where to find hpdf.h, set when +# HARU_INCLUDE_DIR is found. +# HARU_LIBRARIES, libraries to link against to use Haru. +# HARU_ROOT_DIR, The base directory to search for Haru. +# This can also be an environment variable. +# HARU_FOUND, If false, do not try to use Haru. +# +# also defined, but not for general use are +# HARU_LIBRARY, where to find the Haru library. + +#============================================================================= +# Copyright 2021 Blender Foundation. +# +# Distributed under the OSI-approved BSD 3-Clause License, +# see accompanying file BSD-3-Clause-license.txt for details. +#============================================================================= + +# If HARU_ROOT_DIR was defined in the environment, use it. +if(NOT HARU_ROOT_DIR AND NOT $ENV{HARU_ROOT_DIR} STREQUAL "") + set(HARU_ROOT_DIR $ENV{HARU_ROOT_DIR}) +endif() + +set(_haru_SEARCH_DIRS + ${HARU_ROOT_DIR} + /opt/lib/haru +) + +find_path(HARU_INCLUDE_DIR + NAMES + hpdf.h + HINTS + ${_haru_SEARCH_DIRS} + PATH_SUFFIXES + include/haru +) + +find_library(HARU_LIBRARY + NAMES + hpdfs + HINTS + ${_haru_SEARCH_DIRS} + PATH_SUFFIXES + lib64 lib +) + +# Handle the QUIETLY and REQUIRED arguments and set HARU_FOUND to TRUE if +# all listed variables are TRUE. +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Haru DEFAULT_MSG HARU_LIBRARY HARU_INCLUDE_DIR) + +if(HARU_FOUND) + set(HARU_LIBRARIES ${HARU_LIBRARY}) + set(HARU_INCLUDE_DIRS ${HARU_INCLUDE_DIR}) +endif() + +mark_as_advanced( + HARU_INCLUDE_DIR + HARU_LIBRARY +) + +unset(_haru_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 70f48fc33ea..0c78111eaaf 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -99,7 +99,9 @@ macro(BLENDER_SRC_GTEST_EX) # Don't fail tests on leaks since these often happen in external libraries # that we can't fix. - set_tests_properties(${TARGET_NAME} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0) + set_tests_properties(${TARGET_NAME} PROPERTIES + ENVIRONMENT LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS} + ) endif() if(WIN32) set_target_properties(${TARGET_NAME} PROPERTIES VS_GLOBAL_VcpkgEnabled "false") |