Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-18 02:58:17 +0300
committerCampbell Barton <campbell@blender.org>2022-08-18 03:01:27 +0300
commit2a2ca3292a93c224647c84916c09337ece661b5b (patch)
tree46ee4e26b2f34ecf1ed72fdcc3c18c8f20fc6541 /build_files/cmake/platform
parentcfe5bf4b2222f7cd1b41e7ee7f6fa84e807aaeb0 (diff)
CMake: always unset CMAKE_REQUIRED_* variables after use
Always unset these variables after use as they could interfere with other checks made afterwards.
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index bfba89d3a13..f18638dfa6b 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -100,8 +100,8 @@ find_package_wrapper(Epoxy REQUIRED)
function(check_freetype_for_brotli)
include(CheckSymbolExists)
set(CMAKE_REQUIRED_INCLUDES ${FREETYPE_INCLUDE_DIRS})
- check_symbol_exists(FT_CONFIG_OPTION_USE_BROTLI
- "freetype/config/ftconfig.h" HAVE_BROTLI)
+ check_symbol_exists(FT_CONFIG_OPTION_USE_BROTLI "freetype/config/ftconfig.h" HAVE_BROTLI)
+ unset(CMAKE_REQUIRED_INCLUDES)
if(NOT HAVE_BROTLI)
unset(HAVE_BROTLI CACHE)
message(FATAL_ERROR "Freetype needs to be compiled with brotli support!")
@@ -957,6 +957,7 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED)
set(CMAKE_REQUIRED_LIBRARIES atomic)
check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC)
+ unset(CMAKE_REQUIRED_LIBRARIES)
if(ATOMIC_OPS_WITH_LIBATOMIC)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE)