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:
authorHoward Trickey <howard.trickey@gmail.com>2020-07-31 02:47:41 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-07-31 02:47:41 +0300
commit9f23dbe75c64c208a9a5cdff815fdd07068374fe (patch)
tree73f24c16f4932c11a21ebc9f06bdc2a5f2deba4d /build_files
parenta85a52f064cb28d4388bbfbc892e9dbf846187fe (diff)
parent44928a2a8f2ebb3a9489e21aa3169b20f6945590 (diff)
Merge branch 'master' into newboolean
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake21
-rw-r--r--build_files/cmake/platform/platform_unix.cmake5
-rw-r--r--build_files/cmake/platform/platform_win32.cmake4
3 files changed, 30 insertions, 0 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index cba7cc46791..812b332620f 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -169,6 +169,26 @@ function(blender_include_dirs_sys
include_directories(SYSTEM ${_ALL_INCS})
endfunction()
+# Set include paths for header files included with "*.h" syntax.
+# This enables auto-complete suggestions for user header files on Xcode.
+# Build process is not affected since the include paths are the same
+# as in HEADER_SEARCH_PATHS.
+function(blender_user_header_search_paths
+ name
+ includes
+ )
+
+ if(XCODE)
+ set(_ALL_INCS "")
+ foreach(_INC ${includes})
+ get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
+ # _ALL_INCS is a space-separated string of file paths in quotes.
+ set(_ALL_INCS "${_ALL_INCS} \"${_ABS_INC}\"")
+ endforeach()
+ set_target_properties(${name} PROPERTIES XCODE_ATTRIBUTE_USER_HEADER_SEARCH_PATHS "${_ALL_INCS}")
+ endif()
+endfunction()
+
function(blender_source_group
name
sources
@@ -317,6 +337,7 @@ function(blender_add_lib__impl
# works fine without having the includes
# listed is helpful for IDE's (QtCreator/MSVC)
blender_source_group("${name}" "${sources}")
+ blender_user_header_search_paths("${name}" "${includes}")
list_assert_duplicates("${sources}")
list_assert_duplicates("${includes}")
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 25024f49730..526201967ae 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -36,6 +36,11 @@ if(NOT DEFINED LIBDIR)
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
set(WITH_CXX11_ABI OFF)
+
+ if(CMAKE_COMPILER_IS_GNUCC AND
+ CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
+ message(FATAL_ERROR "GCC version must be at least 9.3 for precompiled libraries, found ${CMAKE_C_COMPILER_VERSION}")
+ endif()
endif()
# Avoid namespace pollustion.
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index dfcd5d75444..5a27f4e4c24 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -26,6 +26,10 @@ if(NOT MSVC)
message(FATAL_ERROR "Compiler is unsupported")
endif()
+if(WITH_GTESTS AND ${CMAKE_VERSION} VERSION_LESS "3.18.0")
+ message(FATAL_ERROR "CMake 3.18.0 is required for building WITH_GTESTS on windows, currently installed cmake version is ${CMAKE_VERSION}")
+endif()
+
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(MSVC_CLANG On)
set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables")