2008-04-16 22:40:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# ***** BEGIN GPL LICENSE BLOCK *****
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# This program is free software; you can redistribute it and/or
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# modify it under the terms of the GNU General Public License
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# as published by the Free Software Foundation; either version 2
 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-16 22:40:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# of the License, or (at your option) any later version.
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# This program is distributed in the hope that it will be useful,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# GNU General Public License for more details.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# You should have received a copy of the GNU General Public License
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# along with this program; if not, write to the Free Software Foundation,
 
							 
						 
					
						
							
								
									
										
										
										
											2010-02-12 13:34:04 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# The Original Code is Copyright (C) 2006, Blender Foundation
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# All rights reserved.
 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-15 10:53:55 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
									
										
										
										
											2008-04-16 22:40:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# ***** END GPL LICENSE BLOCK *****
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-12-13 02:57:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 15:51:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# We don't allow in-source builds. This causes no end of troubles because
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# all out-of-source builds will use the CMakeCache.txt file there and even
 
							 
						 
					
						
							
								
									
										
										
										
											2011-02-19 12:05:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# build the libs and objects in it.
 
							 
						 
					
						
							
								
									
										
										
										
											2006-12-13 02:57:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( ${ CMAKE_SOURCE_DIR }  STREQUAL  ${ CMAKE_BINARY_DIR } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-21 05:49:47 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  DEFINED  WITH_IN_SOURCE_BUILD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C M a k e  g e n e r a t i o n  f o r  b l e n d e r  i s  n o t  a l l o w e d  w i t h i n  t h e  s o u r c e  d i r e c t o r y ! " 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-06-16 07:38:20 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      " \ n  R e m o v e  \ " $ { C M A K E _ S O U R C E _ D I R } / C M a k e C a c h e . t x t \ "  a n d  t r y  a g a i n  f r o m  a n o t h e r  f o l d e r ,  e . g . : " 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-21 05:49:47 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      " \ n  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  r m  C M a k e C a c h e . t x t " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  c d  . . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  m k d i r  c m a k e - m a k e " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  c d  c m a k e - m a k e " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  c m a k e  . . / b l e n d e r " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " \ n  A l t e r n a t e l y  d e f i n e  W I T H _ I N _ S O U R C E _ B U I L D  t o  f o r c e  t h i s  option  ( not  recommended! ) " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-12-13 02:57:57 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-28 14:17:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								cmake_minimum_required ( VERSION  3.10 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 02:52:29 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-10-19 09:26:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Prefer LEGACY OpenGL to be compatible with all the existing releases and
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# platforms which don't have GLVND yet. Only do it if preference was not set
 
							 
						 
					
						
							
								
									
										
										
										
											2018-12-14 14:48:05 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# externally.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( NOT  DEFINED  OpenGL_GL_PREFERENCE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( OpenGL_GL_PREFERENCE  "LEGACY" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  EXECUTABLE_OUTPUT_PATH ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( FIRST_RUN  TRUE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( FIRST_RUN  FALSE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# this starts out unset
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-17 02:22:38 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								list ( APPEND  CMAKE_MODULE_PATH  "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-09 15:19:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								list ( APPEND  CMAKE_MODULE_PATH  "${CMAKE_SOURCE_DIR}/build_files/cmake/platform" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-27 13:18:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# avoid having empty buildtype
 
							 
						 
					
						
							
								
									
										
										
										
											2017-06-27 09:50:35 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  DEFINED  CMAKE_BUILD_TYPE_INIT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( CMAKE_BUILD_TYPE_INIT  "Release" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-10 17:42:31 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Internal logic caches this variable, avoid showing it by default
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # since it's easy to accidentally set instead of the build type.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( CMAKE_BUILD_TYPE_INIT ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-06-27 09:50:35 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-27 13:18:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-07-30 15:20:34 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Omit superfluous "Up-to-date" messages.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( NOT  DEFINED  CMAKE_INSTALL_MESSAGE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( CMAKE_INSTALL_MESSAGE  "LAZY" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-07 14:28:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# quiet output for Makefiles, 'make -s' helps too
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-09 06:21:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-07 14:28:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-26 00:51:29 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# global compile definitions since add_definitions() adds for all.
 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 14:26:02 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set_property ( DIRECTORY  APPEND  PROPERTY  COMPILE_DEFINITIONS 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  $ < $ < C O N F I G : D e b u g > : D E B U G ; _ D E B U G > 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  $ < $ < C O N F I G : R e l e a s e > : N D E B U G > 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  $ < $ < C O N F I G : M i n S i z e R e l > : N D E B U G > 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  $ < $ < C O N F I G : R e l W i t h D e b I n f o > : N D E B U G > 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-26 00:51:29 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-08-22 12:24:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Set policy
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-10 02:52:29 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# see "cmake --help-policy CMP0003"
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# So library linking is more sane
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cmake_policy ( SET  CMP0003  NEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# So BUILDINFO and BLENDERPATH strings are automatically quoted
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cmake_policy ( SET  CMP0005  NEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# So syntax problems are errors
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cmake_policy ( SET  CMP0010  NEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Input directories must have CMakeLists.txt
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								cmake_policy ( SET  CMP0014  NEW ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-22 12:24:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-01-26 16:35:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Silence draco warning on macOS, new policy works fine.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-03 18:44:52 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( POLICY  CMP0068 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  cmake_policy ( SET  CMP0068  NEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-26 16:35:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-08-22 16:24:09 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# find_package() uses <PackageName>_ROOT variables.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( POLICY  CMP0074 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  cmake_policy ( SET  CMP0074  NEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-23 14:56:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Load some macros.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								include ( build_files/cmake/macros.cmake ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-09 11:16:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-23 14:56:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Initialize project.
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-23 14:56:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								blender_project_hack_pre ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-09 11:16:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-23 14:56:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								project ( Blender ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-09 11:16:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-23 14:56:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								blender_project_hack_post ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-09 11:16:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-01-21 00:06:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								enable_testing ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Redirect output files
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-05-19 13:55:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( EXECUTABLE_OUTPUT_PATH  ${ CMAKE_BINARY_DIR } /bin  CACHE  INTERNAL  ""  FORCE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( LIBRARY_OUTPUT_PATH  ${ CMAKE_BINARY_DIR } /lib  CACHE  INTERNAL  ""  FORCE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:22:39 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								get_property ( GENERATOR_IS_MULTI_CONFIG  GLOBAL  PROPERTY  GENERATOR_IS_MULTI_CONFIG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( GENERATOR_IS_MULTI_CONFIG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-17 10:04:55 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( TESTS_OUTPUT_DIR  ${ EXECUTABLE_OUTPUT_PATH } /tests/ $< CONFIG > /  CACHE  INTERNAL  ""  FORCE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-17 14:14:26 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-17 10:04:55 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( TESTS_OUTPUT_DIR  ${ EXECUTABLE_OUTPUT_PATH } /tests/  CACHE  INTERNAL  ""  FORCE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Set default config options
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-14 20:26:46 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								get_blender_version ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 23:32:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-26 13:24:56 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Options
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Blender internal features
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 08:15:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_BLENDER  "Build blender (disable to build only the blender player)"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_BLENDER ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-11 01:24:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_INTERNATIONAL  "Enable I18N (International fonts and text)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-28 06:20:47 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-11 01:24:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PYTHON         "Enable Embedded Python API  (only disable for development)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-10 08:12:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PYTHON_SECURITY  "Disables execution of scripts within blend files by default"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-03 16:49:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_PYTHON )   # don't want people disabling this unless they really know what they are doing.
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-28 06:45:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_PYTHON_SECURITY )   # some distributions see this as a security issue, rather than have them patch it, make a build option.
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-28 06:20:47 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-03 16:49:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PYTHON_SAFETY  "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some efficiency, only enable for development)."  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-05 15:23:22 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_PYTHON_SAFETY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-24 19:09:51 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PYTHON_MODULE  "Enable building as a python module which runs without a user interface, like running regular blender in background mode (experimental, only enable for development), installs to PYTHON_SITE_PACKAGES (or CMAKE_INSTALL_PREFIX if WITH_INSTALL_PORTABLE is enabled)."  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-24 12:13:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-22 22:24:38 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_PYTHON_FRAMEWORK  "Enable building using the Python available in the framework (OSX only)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_BUILDINFO      "Include extra build details (only disable for development & faster builds)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-03 16:49:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( BUILDINFO_OVERRIDE_DATE  ""  CACHE  STRING  "Use instead of the current date for reproducible builds (empty string disables this option)" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( BUILDINFO_OVERRIDE_TIME  ""  CACHE  STRING  "Use instead of the current time for reproducible builds (empty string disables this option)" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-09-06 07:21:23 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( CPACK_OVERRIDE_PACKAGENAME  ""  CACHE  STRING  "Use instead of the standard packagename (empty string disables this option)" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( CPACK_OVERRIDE_PACKAGENAME ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-11 02:43:58 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( BUILDINFO_OVERRIDE_DATE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( BUILDINFO_OVERRIDE_TIME ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-02 03:07:41 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-11 01:24:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IK_ITASC       "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-18 13:36:29 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IK_SOLVER      "Enable Legacy IK solver (only disable for development)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_FFTW3          "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 15:17:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PUGIXML        "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_BULLET         "Enable Bullet (Physics Engine)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-01-03 00:23:52 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_SYSTEM_BULLET  "Use the systems bullet library (currently unsupported due to missing features in upstream!)"  ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_SYSTEM_BULLET ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENCOLORIO    "Enable OpenColorIO color management"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-04 16:39:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # There's no OpenXR runtime in sight for macOS, neither is code well
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # tested there -> disable it by default.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_XR_OPENXR    "Enable VR features through the OpenXR specification"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_XR_OPENXR ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												VR: Initial Virtual Reality support - Milestone 1, Scene Inspection
NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.
Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.
To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.
- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.
Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.
---------------
This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)
Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
  regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
  based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
  context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
  to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.
For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.
---------------
A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
  have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
  first bigger application to adopt OpenXR. Congratulations to them and
  ourselves :)
This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report
Differential Revisions: D6193, D7098
Reviewed by: Brecht Van Lommel, Jeroen Bakker
											 
										 
										
											2020-03-17 20:20:55 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_XR_OPENXR    "Enable VR features through the OpenXR specification"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-04 16:39:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-28 10:56:44 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_GMP  "Enable features depending on GMP (Exact Boolean)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-18 10:35:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Compositor
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_COMPOSITOR          "Enable the tile based nodal compositor"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENIMAGEDENOISE    "Enable the OpenImageDenoise compositing node"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-04 14:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENSUBDIV     "Enable OpenSubdiv for surface subdivision"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-20 16:08:06 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-22 08:03:50 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_POTRACE        "Enable features relying on potrace"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENVDB        "Enable features relying on OpenVDB"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_OPENVDB_BLOSC  "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-04-02 18:55:10 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENVDB_3_ABI_COMPATIBLE  "Assume OpenVDB library has been compiled with version 3 ABI compatibility"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_OPENVDB_3_ABI_COMPATIBLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-10 16:19:47 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_NANOVDB        "Enable usage of NanoVDB data structure for rendering on the GPU"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-01 21:58:57 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_HARU           "Enable features relying on Libharu (Grease pencil PDF export)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
											
												Implementation of OpenVDB as a possible cache format for smoke
simulations.
This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.
A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.
A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB
Reviewers: sergey, lukastoenne, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht
Differential Revision: https://developer.blender.org/D1721
											 
										 
										
											2016-01-23 08:39:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# GHOST Windowing Library Options
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_GHOST_DEBUG    "Enable debugging output for the GHOST library"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_GHOST_DEBUG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-23 09:27:56 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-01-18 10:20:08 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_GHOST_SDL     "Enable building Blender against SDL for windowing rather than the native APIs"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_GHOST_SDL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-12 13:17:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 20:07:01 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  ( APPLE  OR  HAIKU ) ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_GHOST_X11  "Enable building Blender against X11 for windowing"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_GHOST_X11 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_GHOST_WAYLAND  "Enable building Blender against Wayland for windowing (under development)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_GHOST_WAYLAND ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-30 13:46:42 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 19:14:50 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_GHOST_X11 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 19:43:15 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_GHOST_XDND     "Enable drag'n'drop support on X11 using XDND protocol"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Misc...
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-04 14:12:55 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_HEADLESS       "Build without graphical support (renderfarm, server mode only)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_HEADLESS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-08-26 18:34:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_QUADRIFLOW     "Build with quadriflow remesher support"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-23 15:43:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_AUDASPACE     "Build with blenders audio library (only disable if you know what you're doing!)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-16 10:03:35 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_SYSTEM_AUDASPACE  "Build with external audaspace library installed on the system (only enable if you know what you're doing!)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_AUDASPACE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-16 10:03:35 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_SYSTEM_AUDASPACE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_AUDASPACE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_SYSTEM_AUDASPACE  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-04-14 15:38:34 +06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENMP         "Enable OpenMP (has to be supported by the compiler)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-02 18:09:06 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_OPENMP_STATIC  "Link OpenMP statically (only used by the release environment)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_OPENMP_STATIC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 19:14:50 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_GHOST_X11 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_X11_XINPUT     "Enable X11 Xinput (tablet support and unicode input)"   ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_X11_XF86VMODE  "Enable X11 video mode switching"                        ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 20:12:12 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_X11_XFIXES     "Enable X11 XWayland cursor warping workaround"          ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-09 21:07:58 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_X11_ALPHA      "Enable X11 transparent background"                      ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-03 16:34:10 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_SYSTEM_GLEW  "Use GLEW OpenGL wrapper library provided by the operating system"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_SYSTEM_GLES  "Use OpenGL ES library provided by the operating system"            ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-06 01:51:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # not an option for other OS's
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-23 13:42:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_SYSTEM_GLEW  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_SYSTEM_GLES  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-25 04:56:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-23 14:23:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-03-19 15:41:41 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_SYSTEM_EIGEN3  "Use the systems Eigen3 library"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-23 14:23:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-10-23 15:40:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Modifiers
 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-16 15:45:47 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_MOD_FLUID            "Enable Mantaflow Fluid Simulation Framework"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-29 15:43:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_MOD_REMESH           "Enable Remesh Modifier"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_MOD_OCEANSIM         "Enable Ocean Modifier"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-10-23 15:40:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Image format support
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 23:32:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENIMAGEIO          "Enable OpenImageIO Support (http://www.openimageio.org)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_OPENEXR        "Enable OpenEXR Support (http://www.openexr.com)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-30 18:52:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_OPENJPEG       "Enable OpenJpeg Support (http://www.openjpeg.org)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-12 08:36:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_TIFF           "Enable LibTIFF Support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-03 11:25:34 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_DDS            "Enable DDS Image Support"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_CINEON         "Enable CINEON and DPX Image Support"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_IMAGE_HDR            "Enable HDR Image Support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-11-30 18:52:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Audio/Video format support
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-08 02:51:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CODEC_AVI            "Enable Blenders own AVI file support (raw/jpeg)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CODEC_FFMPEG         "Enable FFMPeg Support (http://ffmpeg.org)"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_CODEC_SNDFILE        "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-11-17 09:23:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
											 
										 
										
											2016-08-06 06:20:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Alembic support
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_ALEMBIC              "Enable Alembic Support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
											
												Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
											 
										 
										
											2016-08-06 06:20:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												USD: Introducing a simple USD Exporter
This commit introduces the first version of an exporter to Pixar's
Universal Scene Description (USD) format.
Reviewed By: sergey, LazyDodo
Differential Revision: https://developer.blender.org/D6287
- The USD libraries are built by `make deps`, but not yet built by
  install_deps.sh.
- Only experimental support for instancing; by default all duplicated
  objects are made real in the USD file. This is fine for exporting a
  linked-in posed character, not so much for thousands of pebbles etc.
- The way materials and UV coordinates and Normals are exported is going
  to change soon.
- This patch contains LazyDodo's fixes for building on Windows in D5359.
== Meshes ==
USD seems to support neither per-material nor per-face-group
double-sidedness, so we just use the flag from the first non-empty
material slot. If there is no material we default to double-sidedness.
Each UV map is stored on the mesh in a separate primvar. Materials can
refer to these UV maps, but this is not yet exported by Blender. The
primvar name is the same as the UV Map name. This is to allow the
standard name "st" for texture coordinates by naming the UV Map as such,
without having to guess which UV Map is the "standard" one.
Face-varying mesh normals are written to USD. When the mesh has custom
loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is
inspected to determine the normals.
The UV maps and mesh normals take up a significant amount of space, so
exporting them is optional. They're still enabled by default, though.
For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported
with UVs and normals, and 262 MiB without. We probably have room for
optimisation of written UVs and normals.
The mesh subdivision scheme isn't using the default value 'Catmull
Clark', but uses 'None', indicating we're exporting a polygonal mesh.
This is necessary for USD to understand our normals; otherwise the mesh
is always rendered smooth. In the future we may want to expose this
choice of subdivision scheme to the user, or auto-detect it when we
actually support exporting pre-subdivision meshes.
A possible optimisation could be to inspect whether all polygons are
smooth or flat, and mark the USD mesh as such. This can be added when
needed.
== Animation ==
Mesh and transform animation are now written when passing
`animation=True` to the export operator. There is no inspection of
whether an object is actually animated or not; USD can handle
deduplication of static values for us.
The administration of which timecode to use for the export is left to
the file-format-specific concrete subclasses of
`AbstractHierarchyIterator`; the abstract iterator itself doesn't know
anything about the passage of time. This will allow subclasses for the
frame-based USD format and time-based Alembic format.
== Support for simple preview materials ==
Very simple versions of the materials are now exported, using only the
viewport diffuse RGB, metallic, and roughness.
When there are multiple materials, the mesh faces are stored as geometry
subset and each material is assigned to the appropriate subset. If there
is only one material this is skipped.
The first material if any) is always applied to the mesh itself
(regardless of the existence of geometry subsets), because the Hydra
viewport doesn't support materials on subsets. See
https://github.com/PixarAnimationStudios/USD/issues/542 for more info.
Note that the geometry subsets are not yet time-sampled, so it may break
when an animated mesh changes topology.
Materials are exported as a flat list under a top-level '/_materials'
namespace. This inhibits instancing of the objects using those
materials, so this is subject to change.
== Hair ==
Only the parent strands are exported, and only with a constant colour.
No UV coordinates, no information about the normals.
== Camera ==
Only perspective cameras are supported for now.
== Particles ==
Particles are only written when they are alive, which means that they
are always visible (there is currently no code that deals with marking
them as invisible outside their lifespan).
Particle-system-instanced objects are exported by suffixing the object
name with the particle's persistent ID, giving each particle XForm a
unique name.
== Instancing/referencing ==
This exporter has experimental support for instancing/referencing.
Dupli-object meshes are now written to USD as references to the original
mesh. This is still very limited in correctness, as there are issues
referencing to materials from a referenced mesh.
I am still committing this, as it gives us a place to start when
continuing the quest for proper instancing in USD.
== Lights ==
USD does not directly support spot lights, so those aren't exported yet.
It's possible to add this in the future via the UsdLuxShapingAPI. The
units used for the light intensity are also still a bit of a mystery.
== Fluid vertex velocities ==
Currently only fluid simulations (not meshes in general) have explicit
vertex velocities. This is the most important case for exporting
velocities, though, as the baked mesh changes topology all the time, and
thus computing the velocities at import time in a post-processing step
is hard.
== The Building Process ==
- USD is built as monolithic library, instead of 25 smaller libraries.
  We were linking all of them as 'whole archive' anyway, so this doesn't
  affect the final file size. It does, however, make life easier with
  respect to linking order, and handling upstream changes.
- The JSON files required by USD are installed into datafiles/usd; they
  are required on every platform. Set the `PXR_PATH_DEBUG` to any value
  to have the USD library print the paths it uses to find those files.
- USD is patched so that it finds the aforementioned JSON files in a path
  that we pass to it from Blender.
- USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable
  building the tools in its `bin` directory. This is sent as a pull
  request at https://github.com/PixarAnimationStudios/USD/pull/1048
											 
										 
										
											2019-12-13 10:27:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Universal Scene Description support
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-19 09:39:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_USD                  "Enable Universal Scene Description (USD) Support"  ON ) 
 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												USD: Introducing a simple USD Exporter
This commit introduces the first version of an exporter to Pixar's
Universal Scene Description (USD) format.
Reviewed By: sergey, LazyDodo
Differential Revision: https://developer.blender.org/D6287
- The USD libraries are built by `make deps`, but not yet built by
  install_deps.sh.
- Only experimental support for instancing; by default all duplicated
  objects are made real in the USD file. This is fine for exporting a
  linked-in posed character, not so much for thousands of pebbles etc.
- The way materials and UV coordinates and Normals are exported is going
  to change soon.
- This patch contains LazyDodo's fixes for building on Windows in D5359.
== Meshes ==
USD seems to support neither per-material nor per-face-group
double-sidedness, so we just use the flag from the first non-empty
material slot. If there is no material we default to double-sidedness.
Each UV map is stored on the mesh in a separate primvar. Materials can
refer to these UV maps, but this is not yet exported by Blender. The
primvar name is the same as the UV Map name. This is to allow the
standard name "st" for texture coordinates by naming the UV Map as such,
without having to guess which UV Map is the "standard" one.
Face-varying mesh normals are written to USD. When the mesh has custom
loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is
inspected to determine the normals.
The UV maps and mesh normals take up a significant amount of space, so
exporting them is optional. They're still enabled by default, though.
For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported
with UVs and normals, and 262 MiB without. We probably have room for
optimisation of written UVs and normals.
The mesh subdivision scheme isn't using the default value 'Catmull
Clark', but uses 'None', indicating we're exporting a polygonal mesh.
This is necessary for USD to understand our normals; otherwise the mesh
is always rendered smooth. In the future we may want to expose this
choice of subdivision scheme to the user, or auto-detect it when we
actually support exporting pre-subdivision meshes.
A possible optimisation could be to inspect whether all polygons are
smooth or flat, and mark the USD mesh as such. This can be added when
needed.
== Animation ==
Mesh and transform animation are now written when passing
`animation=True` to the export operator. There is no inspection of
whether an object is actually animated or not; USD can handle
deduplication of static values for us.
The administration of which timecode to use for the export is left to
the file-format-specific concrete subclasses of
`AbstractHierarchyIterator`; the abstract iterator itself doesn't know
anything about the passage of time. This will allow subclasses for the
frame-based USD format and time-based Alembic format.
== Support for simple preview materials ==
Very simple versions of the materials are now exported, using only the
viewport diffuse RGB, metallic, and roughness.
When there are multiple materials, the mesh faces are stored as geometry
subset and each material is assigned to the appropriate subset. If there
is only one material this is skipped.
The first material if any) is always applied to the mesh itself
(regardless of the existence of geometry subsets), because the Hydra
viewport doesn't support materials on subsets. See
https://github.com/PixarAnimationStudios/USD/issues/542 for more info.
Note that the geometry subsets are not yet time-sampled, so it may break
when an animated mesh changes topology.
Materials are exported as a flat list under a top-level '/_materials'
namespace. This inhibits instancing of the objects using those
materials, so this is subject to change.
== Hair ==
Only the parent strands are exported, and only with a constant colour.
No UV coordinates, no information about the normals.
== Camera ==
Only perspective cameras are supported for now.
== Particles ==
Particles are only written when they are alive, which means that they
are always visible (there is currently no code that deals with marking
them as invisible outside their lifespan).
Particle-system-instanced objects are exported by suffixing the object
name with the particle's persistent ID, giving each particle XForm a
unique name.
== Instancing/referencing ==
This exporter has experimental support for instancing/referencing.
Dupli-object meshes are now written to USD as references to the original
mesh. This is still very limited in correctness, as there are issues
referencing to materials from a referenced mesh.
I am still committing this, as it gives us a place to start when
continuing the quest for proper instancing in USD.
== Lights ==
USD does not directly support spot lights, so those aren't exported yet.
It's possible to add this in the future via the UsdLuxShapingAPI. The
units used for the light intensity are also still a bit of a mystery.
== Fluid vertex velocities ==
Currently only fluid simulations (not meshes in general) have explicit
vertex velocities. This is the most important case for exporting
velocities, though, as the baked mesh changes topology all the time, and
thus computing the velocities at import time in a post-processing step
is hard.
== The Building Process ==
- USD is built as monolithic library, instead of 25 smaller libraries.
  We were linking all of them as 'whole archive' anyway, so this doesn't
  affect the final file size. It does, however, make life easier with
  respect to linking order, and handling upstream changes.
- The JSON files required by USD are installed into datafiles/usd; they
  are required on every platform. Set the `PXR_PATH_DEBUG` to any value
  to have the USD library print the paths it uses to find those files.
- USD is patched so that it finds the aforementioned JSON files in a path
  that we pass to it from Blender.
- USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable
  building the tools in its `bin` directory. This is sent as a pull
  request at https://github.com/PixarAnimationStudios/USD/pull/1048
											 
										 
										
											2019-12-13 10:27:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# 3D format support
 
							 
						 
					
						
							
								
									
										
										
										
											2013-11-18 17:12:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Disable opencollada when we don't have precompiled libs
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENCOLLADA    "Enable OpenCollada Support (http://www.opencollada.org)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2009-11-19 11:49:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Sound output
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_SDL            "Enable SDL for sound and joystick support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENAL         "Enable OpenAL Support (http://www.openal.org)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_JACK           "Enable JACK Support (http://www.jackaudio.org)"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    option ( WITH_JACK_DYNLOAD   "Enable runtime dynamic JACK libraries loading"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-27 07:19:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-17 16:35:36 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_SDL_DYNLOAD   "Enable runtime dynamic SDL libraries loading"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Compression
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_LZO            "Enable fast LZO compression (used for pointcache)"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_LZMA           "Enable best LZMA compression, (used for pointcache)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-13 22:33:31 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-13 22:46:15 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_SYSTEM_LZO     "Use the system LZO library"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-13 22:33:31 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-11 11:26:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_DRACO          "Enable Draco mesh compression Python module (used for glTF)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-11-07 12:55:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Camera/motion tracking
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-18 10:35:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_LIBMV          "Enable Libmv structure from motion library"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_LIBMV_SCHUR_SPECIALIZATIONS  "Enable fixed-size schur specializations."  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 23:32:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_LIBMV_SCHUR_SPECIALIZATIONS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-11-07 12:55:18 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 10:58:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Logging/unbit test libraries.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_SYSTEM_GFLAGS    "Use system-wide Gflags instead of a bundled one"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-30 10:52:38 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_SYSTEM_GLOG      "Use system-wide Glog instead of a bundled one"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 10:58:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_SYSTEM_GFLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 14:26:25 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_SYSTEM_GLOG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 10:58:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-12-20 07:57:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Freestyle
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_FREESTYLE      "Enable Freestyle (advanced edges rendering)"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Misc
 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-07 00:58:17 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_INPUT_IME  "Enable Input Method Editor (IME) for complex Asian character input"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_INPUT_NDOF  "Enable NDOF input devices (SpaceNavigator and friends)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-06 11:41:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_INSTALL_PORTABLE  "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-19 19:43:03 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_STATIC_LIBS  "Try to link with static libraries, as much as possible, to make blender more portable across distributions"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-23 20:42:15 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_STATIC_LIBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    option ( WITH_BOOST_ICU  "Boost uses ICU library (required for linking with static Boost built with libicu)."  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( WITH_BOOST_ICU ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-06 11:41:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-15 23:50:44 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-26 23:16:21 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_PYTHON_INSTALL        "Copy system python into the blender install folder"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( ( WITH_AUDASPACE  AND  NOT  WITH_SYSTEM_AUDASPACE )  OR  WITH_MOD_FLUID ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_PYTHON_NUMPY  "Include NumPy in Blender (used by Audaspace and Mantaflow)"   ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-17 11:10:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WIN32  OR  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Windows and macOS have this bundled with Python libraries.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( WITH_PYTHON_INSTALL  OR  WITH_PYTHON_NUMPY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-15 23:50:44 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( PYTHON_NUMPY_PATH             ""  CACHE  PATH  "Path to python site-packages or dist-packages containing 'numpy' module" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( PYTHON_NUMPY_PATH ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( PYTHON_NUMPY_INCLUDE_DIRS     ""  CACHE  PATH  "Path to the include directory of the NumPy module" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( PYTHON_NUMPY_INCLUDE_DIRS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_PYTHON_INSTALL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_PYTHON_INSTALL_NUMPY  "Copy system NumPy into the blender install folder"   ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-15 23:50:44 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    option ( WITH_PYTHON_INSTALL_REQUESTS  "Copy system requests into the blender install folder"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( PYTHON_REQUESTS_PATH  ""  CACHE  PATH  "Path to python site-packages or dist-packages containing 'requests' module" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( PYTHON_REQUESTS_PATH ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-15 14:53:12 +06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CPU_SSE               "Enable SIMD instruction if they're detected on the host machine"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CPU_SSE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-01 23:22:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-28 13:47:27 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Cycles
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-18 10:35:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES                   "Enable Cycles Render Engine"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_STANDALONE        "Build Cycles standalone application"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_STANDALONE_GUI    "Build Cycles standalone with GUI"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_OSL               "Build Cycles with OSL support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-23 09:14:52 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_EMBREE            "Build Cycles with Embree support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-18 10:35:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_CUDA_BINARIES     "Build Cycles CUDA binaries"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-03 10:59:09 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_CUBIN_COMPILER    "Build cubins with nvrtc based compiler instead of nvcc"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-20 01:17:34 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_CUDA_BUILD_SERIAL  "Build cubins one after another (useful on machines with limited RAM)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_CUDA_BUILD_SERIAL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-28 16:19:03 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( CYCLES_TEST_DEVICES  CPU  CACHE  STRING  "Run regression tests on the specified device types (CPU CUDA OPTIX OPENCL)"  ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-13 12:33:34 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( CYCLES_CUDA_BINARIES_ARCH  sm_30  sm_35  sm_37  sm_50  sm_52  sm_60  sm_61  sm_70  sm_75  sm_86  compute_75  CACHE  STRING  "CUDA architectures to build binaries for" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-11-13 14:16:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( CYCLES_CUDA_BINARIES_ARCH ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-05-22 12:30:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								unset ( PLATFORM_DEFAULT ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-07-18 10:35:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_LOGGING   "Build Cycles with logging support"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_DEBUG     "Build Cycles with extra debug capabilities"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-25 16:09:05 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_NATIVE_ONLY   "Build Cycles with native kernel only (which fits current CPU, use for development only)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-07-11 19:29:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_KERNEL_ASAN   "Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even if it's very slow"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_KERNEL_ASAN ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-03 10:59:09 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_CUBIN_COMPILER ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-04 19:00:26 +06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_LOGGING ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_DEBUG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-25 16:09:05 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_NATIVE_ONLY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-28 13:47:27 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 10:31:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_DEVICE_CUDA               "Enable Cycles CUDA compute support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-12 14:50:06 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_DEVICE_OPTIX              "Enable Cycles OptiX support"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 10:31:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_DEVICE_OPENCL             "Enable Cycles OpenCL compute support"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-19 10:22:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CYCLES_NETWORK               "Enable Cycles compute over network support (EXPERIMENTAL and unfinished)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 10:31:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_DEVICE_CUDA ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_DEVICE_OPENCL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CYCLES_NETWORK ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-01-14 12:24:09 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CUDA_DYNLOAD  "Dynamically load CUDA libraries at runtime"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CUDA_DYNLOAD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-10-06 11:00:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# LLVM
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_LLVM                     "Use LLVM"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-08-06 12:48:06 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( LLVM_STATIC                   "Link with LLVM static libraries"  ON )  # we prefer static llvm build on Apple, dyn build possible though
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( LLVM_STATIC                   "Link with LLVM static libraries"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-04-15 16:18:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( LLVM_STATIC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-06 11:00:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-12 11:16:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# disable for now, but plan to support on all platforms eventually
 
							 
						 
					
						
							
								
									
										
										
										
											2015-02-14 15:13:48 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_MEM_JEMALLOC    "Enable malloc replacement (http://www.canonware.com/jemalloc)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-12 11:16:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_MEM_JEMALLOC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-10-03 12:22:44 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# currently only used for BLI_mempool
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_MEM_VALGRIND  "Enable extended valgrind support for better reporting"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_MEM_VALGRIND ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-08 09:02:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Debug
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-11 01:24:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_CXX_GUARDEDALLOC  "Enable GuardedAlloc for C++ memory allocation tracking (only enable for development)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-08 09:02:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_CXX_GUARDEDALLOC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-28 10:48:06 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_ASSERT_ABORT  "Call abort() when raising an assertion through BLI_assert()"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-15 10:22:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( WITH_ASSERT_ABORT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-03 11:00:58 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( ( UNIX  AND  NOT  APPLE )  OR  ( CMAKE_GENERATOR  MATCHES  "^Visual Studio.+" ) ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_CLANG_TIDY  "Use Clang Tidy to analyze the source code (only enable for development on Linux using Clang, or Windows using the Visual Studio IDE)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-05 11:37:49 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_CLANG_TIDY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-09 16:44:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_BOOST  "Enable features depending on boost"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_TBB    "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-11-25 17:41:25 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# TBB malloc is only supported on for windows currently
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_TBB_MALLOC_PROXY  "Enable the TBB malloc replacement"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-01-31 23:25:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-08-17 09:47:10 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# This should be turned off when Blender enter beta/rc/release
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-09 16:07:29 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( "${BLENDER_VERSION_CYCLE}"  STREQUAL  "release"  OR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								   " $ { B L E N D E R _ V E R S I O N _ C Y C L E } "  S T R E Q U A L  " r c " ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_EXPERIMENTAL_FEATURES  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_EXPERIMENTAL_FEATURES  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-17 09:47:10 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-06-18 22:49:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Unit testsing
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_GTESTS  "Enable GTest unit testing"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 20:33:33 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENGL_RENDER_TESTS  "Enable OpenGL render related unit testing (Experimental)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_OPENGL_DRAW_TESTS  "Enable OpenGL UI drawing related unit testing (Experimental)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.
This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:
- On Windows, the `python….exe` from the installation directory. This is
  just like before this patch, except that this patch adds the
  overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.
Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.
If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.
Differential Revision: https://developer.blender.org/D7395
Reviewed by: campbellbarton, mont29, sergey
											 
										 
										
											2020-04-10 10:35:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( TEST_PYTHON_EXE  ""  CACHE  PATH  "Python executable to run unit tests" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( TEST_PYTHON_EXE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-06-18 22:49:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 14:07:34 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Documentation
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_DOC_MANPAGE  "Create a manual page (Unix manpage)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# OpenGL
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-15 20:17:16 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_OPENGL               "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)"  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_GLEW_ES              "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( WITH_GL_EGL               "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)"        OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-01 13:53:25 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								option ( WITH_GL_PROFILE_ES20      "Support using OpenGL ES 2.0. (through either EGL or the AGL/WGL/XGL 'es20' profile)"                                OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-15 20:17:16 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  W I T H _ O P E N G L 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  W I T H _ G L E W _ E S 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  W I T H _ G L _ E G L 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  W I T H _ G L _ P R O F I L E _ E S 2 0 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_GL_ANGLE  "Link with the ANGLE library, an OpenGL ES 2.0 implementation based on Direct3D, instead of the system OpenGL library."  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_GL_ANGLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_GLEW_ES  AND  WITH_SYSTEM_GLEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( WARNING  Ignoring  WITH_SYSTEM_GLEW  and  using  WITH_GLEW_ES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_SYSTEM_GLEW  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-12-27 16:57:31 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WIN32 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 11:32:32 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  getDefaultWindowsPrefixBase ( CMAKE_GENERIC_PROGRAM_FILES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( CPACK_INSTALL_PREFIX  ${ CMAKE_GENERIC_PROGRAM_FILES } / $ {} ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-11-02 10:42:15 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Compiler toolchain
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( CMAKE_COMPILER_IS_GNUCC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_LINKER_GOLD  "Use ld.gold linker which is usually faster than ld.bfd"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_LINKER_GOLD ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-27 14:10:56 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_LINKER_LLD  "Use ld.lld linker which is usually faster than ld.gold"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_LINKER_LLD ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-11-02 10:42:15 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 15:21:18 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( CMAKE_COMPILER_IS_GNUCC  OR  CMAKE_C_COMPILER_ID  MATCHES  "Clang" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_COMPILER_ASAN  "Build and link against address sanitizer (only for Debug & RelWithDebInfo targets)."  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_COMPILER_ASAN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_COMPILER_ASAN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( _asan_defaults  " \ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = a d d r e s s  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = b o o l  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = b o u n d s  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = e n u m  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = f l o a t - c a s t - o v e r f l o w  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = f l o a t - d i v i d e - b y - z e r o  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = n o n n u l l - a t t r i b u t e  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = r e t u r n s - n o n n u l l - a t t r i b u t e  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = s i g n e d - i n t e g e r - o v e r f l o w  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = u n d e f i n e d  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f s a n i t i z e = v l a - b o u n d  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								- f n o - s a n i t i z e = a l i g n m e n t  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( MSVC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # clang-cl doesn't support all sanitizers, but leak and object-size give errors/warnings.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _asan_defaults  "${_asan_defaults}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    elseif ( APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # AppleClang doesn't support all sanitizers, but leak gives error.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 02:16:15 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # Build type is not known for multi-config generator, so don't add object-size sanitizer.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      if ( CMAKE_BUILD_TYPE  MATCHES  "Debug"  OR  GENERATOR_IS_MULTI_CONFIG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        # Silence the warning that object-size is not effective in -O0.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        set ( _asan_defaults  "${_asan_defaults}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        string ( APPEND  _asan_defaults  " -fsanitize=object-size" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  _asan_defaults  " -fsanitize=leak -fsanitize=object-size" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-31 11:50:30 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 15:21:18 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( COMPILER_ASAN_CFLAGS  "${_asan_defaults}"  CACHE  STRING  "C flags for address sanitizer" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( COMPILER_ASAN_CFLAGS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( COMPILER_ASAN_CXXFLAGS  "${_asan_defaults}"  CACHE  STRING  "C++ flags for address sanitizer" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( COMPILER_ASAN_CXXFLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 15:21:18 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    unset ( _asan_defaults ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( MSVC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        find_library ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          C O M P I L E R _ A S A N _ L I B R A R Y  N A M E S  c l a n g _ r t . a s a n - x 8 6 _ 6 4 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-10 08:12:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        P A T H S 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [ H K E Y _ L O C A L _ M A C H I N E \ \ S O F T W A R E \ \ W o w 6 4 3 2 N o d e \ \ L L V M \ \ L L V M ; ] / l i b / c l a n g / 7 . 0 . 0 / l i b / w i n d o w s 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [ H K E Y _ L O C A L _ M A C H I N E \ \ S O F T W A R E \ \ W o w 6 4 3 2 N o d e \ \ L L V M \ \ L L V M ; ] / l i b / c l a n g / 6 . 0 . 0 / l i b / w i n d o w s 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    elseif ( APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-12 16:06:24 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      execute_process ( COMMAND  ${ CMAKE_CXX_COMPILER } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        - p r i n t - f i l e - n a m e = l i b 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        O U T P U T _ V A R I A B L E  C L A N G _ L I B _ D I R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      string ( STRIP  "${CLANG_LIB_DIR}"  CLANG_LIB_DIR ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      find_library ( 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 02:16:15 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        C O M P I L E R _ A S A N _ L I B R A R Y 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        N A M E S 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          l i b c l a n g _ r t . a s a n _ o s x _ d y n a m i c . d y l i b 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-12 16:06:24 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        P A T H S 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-16 02:16:15 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          " $ { C L A N G _ L I B _ D I R } / d a r w i n / " 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      unset ( CLANG_LIB_DIR ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      find_library ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        C O M P I L E R _ A S A N _ L I B R A R Y  a s a n  $ { C M A K E _ C _ I M P L I C I T _ L I N K _ D I R E C T O R I E S } 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-10 08:12:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-08 00:17:17 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 15:21:18 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( COMPILER_ASAN_LIBRARY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( CMAKE_COMPILER_IS_GNUCC  OR  CMAKE_C_COMPILER_ID  MATCHES  "Clang" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 16:11:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_COMPILER_SHORT_FILE_MACRO  "Make paths in macros like __FILE__ relative to top level source and build directories."  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_COMPILER_SHORT_FILE_MACRO ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-06 04:05:00 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Use hardcoded paths or find_package to find externals
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_WINDOWS_FIND_MODULES  "Use find_package to locate libraries"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_WINDOWS_FIND_MODULES ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-23 08:47:23 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-15 15:35:36 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS  "Organize the visual studio projects according to source folder structure."  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-10-22 10:17:08 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-15 15:44:47 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS  "Organize the source files in filters matching the source folders."  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WINDOWS_USE_VISUAL_STUDIO_SOURCE_FOLDERS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-10-22 10:17:08 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WINDOWS_PYTHON_DEBUG  "Include the files needed for debugging python scripts with visual studio 2017+."  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WINDOWS_PYTHON_DEBUG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-06 10:12:03 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_WINDOWS_BUNDLE_CRT  "Bundle the C runtime for install free distribution."  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_WINDOWS_BUNDLE_CRT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-04-20 12:51:43 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_WINDOWS_SCCACHE  "Use sccache to speed up builds (Ninja builder only)"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_WINDOWS_SCCACHE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 07:37:48 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  option ( WITH_WINDOWS_PDB  "Generate a pdb file for client side stacktraces"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_WINDOWS_PDB ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_WINDOWS_STRIPPED_PDB  "Use a stripped PDB file"  On ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_WINDOWS_STRIPPED_PDB ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-06 04:05:00 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-31 06:26:05 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-21 10:47:35 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # See WITH_WINDOWS_SCCACHE for Windows.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_COMPILER_CCACHE  "Use ccache to improve rebuild times (Works with Ninja, Makefiles and Xcode)"  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-10 17:42:31 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_COMPILER_CCACHE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-21 10:47:35 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.
Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.
This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.
Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.
On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).
Review task: D4780.
											 
										 
										
											2019-05-07 20:32:14 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# The following only works with the Ninja generator in CMake >= 3.0.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( "${CMAKE_GENERATOR}"  MATCHES  "Ninja" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_NINJA_POOL_JOBS 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								         " E n a b l e  N i n j a  p o o l s  o f  j o b s ,  t o  t r y  t o  e a s e  b u i l d i n g  o n  m a c h i n e s  w i t h  1 6 G B  o f  R A M  o r  less  ( if  not  yet  defined,  will  try  to  set  best  values  based  on  detected  machine  specifications ) . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								         O F F ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_NINJA_POOL_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-09 17:14:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  option ( WITH_CXX11_ABI  "Use native C++11 ABI of compiler"  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( WITH_CXX11_ABI ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-11-07 16:50:31 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Installation process.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								option ( POSTINSTALL_SCRIPT  "Run given CMake script after installation process"  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( POSTINSTALL_SCRIPT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 23:32:01 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# end option(...)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 21:44:26 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 11:32:32 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# By default we want to install to the directory we are compiling our executables
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# unless specified otherwise, which we currently do not allow
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-27 16:57:31 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WIN32 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( CMAKE_INSTALL_PREFIX  ${ EXECUTABLE_OUTPUT_PATH } /\ ${ BUILD_TYPE }  CACHE  PATH  "default install path"  FORCE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 14:10:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  elseif ( APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( CMAKE_INSTALL_PREFIX  ${ EXECUTABLE_OUTPUT_PATH } /\ ${ BUILD_TYPE }  CACHE  PATH  "default install path"  FORCE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 14:10:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( WITH_INSTALL_PORTABLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( CMAKE_INSTALL_PREFIX  ${ EXECUTABLE_OUTPUT_PATH }  CACHE  PATH  "default install path"  FORCE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 14:10:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 11:32:32 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-11 21:44:26 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 11:32:32 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Apple
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-07-04 18:40:59 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-23 17:42:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  include ( platform_apple_xcode ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-06-06 13:32:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-13 22:27:21 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-08 01:53:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Check for conflicting/unsupported configurations
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-04-16 15:54:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_BLENDER  AND  NOT  WITH_CYCLES_STANDALONE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( FATAL_ERROR 
							 
						 
					
						
							
								
									
										
										
										
											2018-04-16 15:54:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " A t  l e a s t  o n e  o f  W I T H _ B L E N D E R  o r  W I T H _ C Y C L E S _ S T A N D A L O N E  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " m u s t  b e  e n a b l e d ,  n o t h i n g  t o  d o ! " 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 08:15:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-11-12 04:50:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_AUDASPACE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_OPENAL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-10 11:25:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING  "WITH_OPENAL requires WITH_AUDASPACE which is disabled" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_OPENAL  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-12 04:50:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_JACK ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-10 11:25:47 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING  "WITH_JACK requires WITH_AUDASPACE which is disabled" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_JACK  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-12 04:50:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-23 09:27:56 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 06:04:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_SDL  AND  WITH_GHOST_SDL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-12 04:50:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( FATAL_ERROR  "WITH_GHOST_SDL requires WITH_SDL" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-12 13:17:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-04-16 14:07:42 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# python module, needs some different options
 
							 
						 
					
						
							
								
									
										
										
										
											2011-02-22 14:27:46 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_PYTHON_MODULE  AND  WITH_PYTHON_INSTALL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( FATAL_ERROR  "WITH_PYTHON_MODULE requires WITH_PYTHON_INSTALL to be OFF" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-08-07 22:40:03 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_PYTHON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_CYCLES  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-11 11:26:23 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_DRACO  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-07 22:40:03 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-04-12 14:26:17 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_DRACO  AND  NOT  WITH_PYTHON_INSTALL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( STATUS  "WITH_DRACO requires WITH_PYTHON_INSTALL to be ON, disabling WITH_DRACO for now" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_DRACO  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 17:36:33 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# enable boost for cycles, audaspace or i18n
 
							 
						 
					
						
							
								
									
										
										
										
											2013-01-31 23:25:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# otherwise if the user disabled
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 07:27:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_CYCLES          OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_INTERNATIONAL   OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_OPENVDB         OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_OPENCOLORIO     OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_QUADRIFLOW      OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_USD             OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 07:03:36 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_BOOST  WITH_ALEMBIC         OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 15:17:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_PUGIXML  WITH_CYCLES_OSL    OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_PUGIXML  WITH_OPENIMAGEIO   OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 07:27:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-08 17:17:28 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_BOOST  AND  NOT  ( WITH_CYCLES  OR  WITH_OPENIMAGEIO  OR  WITH_INTERNATIONAL  OR 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 07:03:36 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								   W I T H _ O P E N V D B  O R  W I T H _ O P E N C O L O R I O  O R  W I T H _ U S D  O R  W I T H _ A L E M B I C ) ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 07:27:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( STATUS  "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-25 16:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_BOOST  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-16 16:15:34 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-05 12:53:38 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_TBB  WITH_CYCLES             OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 07:27:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_TBB  WITH_USD                OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_TBB  WITH_OPENIMAGEDENOISE   OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_TBB  WITH_OPENVDB            OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_TBB  WITH_MOD_FLUID          OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-02 17:40:28 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# NanoVDB requires OpenVDB to convert the data structure
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_OPENVDB  WITH_NANOVDB        OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-07 07:27:40 -07:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-04 10:39:53 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# OpenVDB uses 'half' type from OpenEXR & fails to link without OpenEXR enabled.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_IMAGE_OPENEXR  WITH_OPENVDB  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 02:15:40 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set_and_warn_dependency ( WITH_IMAGE_TIFF  WITH_HARU        OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-27 18:44:46 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# auto enable openimageio for cycles
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_CYCLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_OPENIMAGEIO  ON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-14 09:34:42 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # auto enable llvm for cycles_osl
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_CYCLES_OSL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_LLVM  ON  CACHE  BOOL  ""  FORCE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-14 09:50:33 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_CYCLES_OSL  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-27 18:44:46 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# auto enable openimageio linking dependencies
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_OPENIMAGEIO ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_IMAGE_OPENEXR  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_IMAGE_TIFF  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
											
												Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
 guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
											 
										 
										
											2016-08-06 06:20:37 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# auto enable alembic linking dependencies
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_ALEMBIC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( WITH_IMAGE_OPENEXR  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-09-28 06:45:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# don't store paths to libs for portable distribution
 
							 
						 
					
						
							
								
									
										
										
										
											2011-08-23 20:19:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_INSTALL_PORTABLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( CMAKE_SKIP_BUILD_RPATH  TRUE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-13 14:28:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_GHOST_SDL  OR  WITH_HEADLESS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 20:07:01 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_GHOST_WAYLAND  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-01 19:14:50 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_GHOST_X11      OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_X11_XINPUT     OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-16 10:39:19 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_X11_XF86VMODE  OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 20:12:12 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_X11_XFIXES     OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-09 21:07:58 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_X11_ALPHA      OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_GHOST_XDND     OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-21 03:02:09 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_INPUT_IME      OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-03-18 14:55:05 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( WITH_XR_OPENXR      OFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-13 14:28:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-15 14:53:12 +06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_CPU_SSE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  TEST_SSE_SUPPORT ( COMPILER_SSE_FLAG  COMPILER_SSE2_FLAG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( STATUS  "SSE and SSE2 optimizations are DISABLED!" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( COMPILER_SSE_FLAG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( COMPILER_SSE2_FLAG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-13 22:27:21 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-03-11 13:05:44 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_BUILDINFO ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  find_package ( Git ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  GIT_FOUND ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-11 14:49:23 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING  "Git was not found, disabling WITH_BUILDINFO" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-11 13:05:44 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( WITH_BUILDINFO  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-16 10:03:35 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_AUDASPACE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_SYSTEM_AUDASPACE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( AUDASPACE_C_INCLUDE_DIRS  "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings/C"  "${CMAKE_BINARY_DIR}/extern/audaspace" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( AUDASPACE_PY_INCLUDE_DIRS  "${CMAKE_SOURCE_DIR}/extern/audaspace/bindings" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-16 10:03:35 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 10:20:26 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Auto-enable CUDA dynload if toolkit is not found.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_CUDA_DYNLOAD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  find_package ( CUDA ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-06-19 07:24:55 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  CUDA_FOUND ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-02-14 10:20:26 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( "CUDA toolkit not found, using dynamic runtime loading of libraries instead" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_CUDA_DYNLOAD  ON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-03-14 00:30:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 14:22:52 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Check check if submodules are cloned
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-14 00:30:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_INTERNATIONAL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 14:22:52 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  file ( GLOB  RESULT  "${CMAKE_SOURCE_DIR}/release/datafiles/locale" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( LENGTH  RESULT  DIR_LEN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( DIR_LEN  EQUAL  0 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " T r a n s l a t i o n  p a t h  ' $ { C M A K E _ S O U R C E _ D I R } / r e l e a s e / d a t a f i l e s / l o c a l e '  i s  m i s s i n g ,  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " T h i s  i s  a  ' g i t  s u b m o d u l e ' ,  w h i c h  a r e  k n o w n  n o t  t o  w o r k  w i t h  b r i d g e s  t o  o t h e r  v e r s i o n  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " c o n t r o l  s y s t e m s ,  d i s a b l i n g  ' W I T H _ I N T E R N A T I O N A L ' . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-14 00:30:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( WITH_INTERNATIONAL  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_PYTHON ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-12-04 16:37:31 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # While we have this as an '#error' in 'bpy_capi_utils.h',
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-08 14:00:42 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # upgrading Python tends to cause confusion for users who build.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Give the error message early to make this more obvious.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  #
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Do this before main 'platform_*' checks,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # because UNIX will search for the old Python paths which may not exist.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # giving errors about missing paths before this case is met.
 
							 
						 
					
						
							
								
									
										
										
										
											2019-02-04 21:58:34 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( DEFINED  PYTHON_VERSION  AND  "${PYTHON_VERSION}"  VERSION_LESS  "3.7" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR  "At least Python 3.7 is required to build" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-08 14:00:42 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-09-05 14:22:52 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  file ( GLOB  RESULT  "${CMAKE_SOURCE_DIR}/release/scripts/addons" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( LENGTH  RESULT  DIR_LEN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( DIR_LEN  EQUAL  0 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " A d d o n s  p a t h  ' $ { C M A K E _ S O U R C E _ D I R } / r e l e a s e / s c r i p t s / a d d o n s '  i s  m i s s i n g ,  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " T h i s  i s  a  ' g i t  s u b m o d u l e ' ,  w h i c h  a r e  k n o w n  n o t  t o  w o r k  w i t h  b r i d g e s  t o  o t h e r  v e r s i o n  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " c o n t r o l  s y s t e m s :  *  C O N T I N U I N G  W I T H O U T  A D D O N S  * " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-03-14 00:30:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-22 06:23:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Initialize un-cached vars, avoid unused warning
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-21 13:13:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# linux only, not cached
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( WITH_BINRELOC  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-12-29 01:09:11 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# MACOSX only, set to avoid uninitialized
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 19:52:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( EXETYPE  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-28 02:49:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# C/C++ flags
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( PLATFORM_CFLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-14 00:24:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-22 06:23:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# these are added to later on.
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-28 02:49:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( C_WARNINGS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( CXX_WARNINGS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-30 04:48:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# for gcc -Wno-blah-blah
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( C_REMOVE_STRICT_FLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:07:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( CXX_REMOVE_STRICT_FLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-30 04:48:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-15 16:00:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Libraries to link to targets in setup_platform_linker_libs
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 19:52:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( PLATFORM_LINKLIBS  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-28 02:49:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-09-15 16:00:15 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Added to target linker flags in setup_platform_linker_flags
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-28 02:49:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# - CMAKE_EXE_LINKER_FLAGS
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# - CMAKE_EXE_LINKER_FLAGS_DEBUG
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 19:52:33 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								set ( PLATFORM_LINKFLAGS  "" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( PLATFORM_LINKFLAGS_DEBUG  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-02-22 06:23:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-19 07:24:55 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  CMAKE_BUILD_TYPE  MATCHES  "Release" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-08 11:45:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_COMPILER_ASAN ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-08 19:47:45 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # Avoid passing address sanitizer compiler flags to `try_compile`.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # Since linker flags are not set, all compiler checks and `find_package`
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # calls that rely on `try_compile` will fail.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # See CMP0066 also.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_C_FLAGS_DEBUG  " ${COMPILER_ASAN_CFLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_C_FLAGS_RELWITHDEBINFO  " ${COMPILER_ASAN_CFLAGS}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-08 19:47:45 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_CXX_FLAGS_DEBUG  " ${COMPILER_ASAN_CXXFLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_CXX_FLAGS_RELWITHDEBINFO  " ${COMPILER_ASAN_CXXFLAGS}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-10-08 19:47:45 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-08 11:45:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( MSVC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-17 20:15:24 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      set ( COMPILER_ASAN_LINKER_FLAGS  "/FUNCTIONPADMIN:6" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-08 11:45:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 13:05:33 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( APPLE  AND  COMPILER_ASAN_LIBRARY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      string ( REPLACE  " "  ";"  _list_COMPILER_ASAN_CFLAGS  ${ COMPILER_ASAN_CFLAGS } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 13:55:52 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      set ( _is_CONFIG_DEBUG  "$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 13:23:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      add_compile_options ( "$<${_is_CONFIG_DEBUG}:${_list_COMPILER_ASAN_CFLAGS}>" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      add_link_options ( "$<${_is_CONFIG_DEBUG}:-fno-omit-frame-pointer;-fsanitize=address>" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 13:05:33 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      unset ( _list_COMPILER_ASAN_CFLAGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-02 13:23:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      unset ( _is_CONFIG_DEBUG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-26 13:05:33 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    elseif ( COMPILER_ASAN_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												CMake: Refactor external dependencies handling
This is a more correct fix to the issue Brecht was fixing in D6600.
While the fix in that patch worked fine for linking it broke ASAN
runtime under some circumstances.
For example, `make full debug developer` would compile, but trying
to start blender will cause assert failure in ASAN (related on check
that ASAN is not running already).
Top-level idea: leave it to CMake to keep track of dependency graph.
The root of the issue comes to the fact that target like "blender" is
configured to use a lot of static libraries coming from Blender sources
and to use external static libraries. There is nothing which ensures
order between blender's and external libraries. Only order of blender
libraries is guaranteed.
It was possible that due to a cycle or other circumstances some of
blender libraries would have been passed to linker after libraries
it uses, causing linker errors.
For example, this order will likely fail:
  libbf_blenfont.a libfreetype6.a libbf_blenfont.a
This change makes it so blender libraries are explicitly provided
their dependencies to an external libraries, which allows CMake to
ensure they are always linked against them.
General rule here: if bf_foo depends on an external library it is
to be provided to LIBS for bf_foo.
For example, if bf_blenkernel depends on opensubdiv then LIBS in
blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES.
The change is made based on searching for used include folders
such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries
to LIBS ion that CMakeLists.txt. Transitive dependencies are not
simplified by this approach, but I am not aware of any downside of
this: CMake should be smart enough to simplify them on its side.
And even if not, this shouldn't affect linking time.
Benefit of not relying on transitive dependencies is that build
system is more robust towards future changes. For example, if
bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES
and all such code is moved to bf_blenkernel this will not break
linking.
The not-so-trivial part is change to blender_add_lib (and its
version in Cycles). The complexity is caused by libraries being
provided as a single list argument which doesn't allow to use
different release and debug libraries on Windows. The idea is:
- Have every library prefixed as "optimized" or "debug" if
  separation is needed (non-prefixed libraries will be considered
  "generic").
- Loop through libraries passed to function and do simple parsing
  which will look for "optimized" and "debug" words and specify
  following library to corresponding category.
This isn't something particularly great. Alternative would be to
use target_link_libraries() directly, which sounds like more code
but which is more explicit and allows to have more flexibility
and control comparing to wrapper approach.
Tested the following configurations on Linux, macOS and Windows:
- make full debug developer
- make full release developer
- make lite debug developer
- make lite release developer
NOTE: Linux libraries needs to be compiled with D6641 applied,
otherwise, depending on configuration, it's possible to run into
duplicated zlib symbols error.
Differential Revision: https://developer.blender.org/D6642
											 
										 
										
											2020-01-20 18:36:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      set ( PLATFORM_LINKLIBS  "${PLATFORM_LINKLIBS};${COMPILER_ASAN_LIBRARY}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( PLATFORM_LINKFLAGS  "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( PLATFORM_LINKFLAGS_DEBUG  "${COMPILER_ASAN_LIBRARY} ${COMPILER_ASAN_LINKER_FLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-31 11:50:30 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-05-18 15:21:18 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-02-22 06:23:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-07-28 17:47:21 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# ----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Main Platform Checks
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# - UNIX
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# - WIN32
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# - APPLE
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-03 09:23:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-09 15:19:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  include ( platform_unix ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-21 13:41:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( WIN32 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-09 15:19:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  include ( platform_win32 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-21 13:41:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-08-09 15:19:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  include ( platform_apple ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-21 13:41:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Common.
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-11 08:23:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-12-05 15:46:31 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_FFTW3  AND  WITH_MOD_OCEANSIM ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( FATAL_ERROR  "WITH_MOD_OCEANSIM requires WITH_FFTW3 to be ON" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-07-01 15:26:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_CYCLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_OPENIMAGEIO ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C y c l e s  r e q u i r e s  W I T H _ O P E N I M A G E I O ,  t h e  l i b r a r y  m a y  n o t  h a v e  b e e n  f o u n d .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C o n f i g u r e  O I I O  o r  d i s a b l e  W I T H _ C Y C L E S " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-07-01 15:26:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_BOOST ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C y c l e s  r e q u i r e s  W I T H _ B O O S T ,  t h e  l i b r a r y  m a y  n o t  h a v e  b e e n  f o u n d .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C o n f i g u r e  B O O S T  o r  d i s a b l e  W I T H _ C Y C L E S " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-07-01 15:26:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-11-15 17:16:27 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_CYCLES_OSL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-06 11:00:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( NOT  WITH_LLVM ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " C y c l e s  O S L  r e q u i r e s  W I T H _ L L V M ,  t h e  l i b r a r y  m a y  n o t  h a v e  b e e n  f o u n d .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " C o n f i g u r e  L L V M  o r  d i s a b l e  W I T H _ C Y C L E S _ O S L " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-06 11:00:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-07-01 15:26:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-11-11 16:54:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_INTERNATIONAL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_BOOST ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " I n t e r n a t i o n a l i z a t i o n  r e q u i r e s  W I T H _ B O O S T ,  t h e  l i b r a r y  m a y  n o t  h a v e  b e e n  f o u n d .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " C o n f i g u r e  B O O S T  o r  d i s a b l e  W I T H _ I N T E R N A T I O N A L " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-11-11 16:54:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-07-01 15:26:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-08-01 06:11:41 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# See TEST_SSE_SUPPORT() for how this is defined.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-05-05 19:25:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Do it globally, SSE2 is required for quite some time now.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Doing it now allows to use SSE/SSE2 in inline headers.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( SUPPORT_SSE_BUILD ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( PREPEND  PLATFORM_CFLAGS  "${COMPILER_SSE_FLAG} " ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-05 19:25:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -D__SSE__  -D__MMX__ ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( SUPPORT_SSE2_BUILD ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( APPEND  PLATFORM_CFLAGS  " ${COMPILER_SSE2_FLAG}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-05 19:25:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -D__SSE2__ ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-03 16:49:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  SUPPORT_SSE_BUILD )  # don't double up
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-05 19:25:08 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    add_definitions ( -D__MMX__ ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-11 08:23:48 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-08 08:43:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-19 08:02:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# set the endian define
 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-07 12:03:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( MSVC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-27 01:32:27 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # for some reason this fails on msvc
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-19 08:02:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -D__LITTLE_ENDIAN__ ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-27 21:40:18 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-06-19 07:24:55 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # OSX-Note: as we do cross-compiling with specific set architecture,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # endianess-detection and auto-setting is counterproductive
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # so we just set endianness according CMAKE_OSX_ARCHITECTURES
 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-07 13:51:19 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-16 09:25:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( CMAKE_OSX_ARCHITECTURES  MATCHES  i386  OR  CMAKE_OSX_ARCHITECTURES  MATCHES  x86_64  OR  CMAKE_OSX_ARCHITECTURES  MATCHES  arm64 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-07 13:51:19 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -D__LITTLE_ENDIAN__ ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-27 21:40:18 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( CMAKE_OSX_ARCHITECTURES  MATCHES  ppc  OR  CMAKE_OSX_ARCHITECTURES  MATCHES  ppc64 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-08-07 13:51:19 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -D__BIG_ENDIAN__ ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-27 21:40:18 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-27 01:32:27 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  include ( TestBigEndian ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  test_big_endian ( _SYSTEM_BIG_ENDIAN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( _SYSTEM_BIG_ENDIAN ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    add_definitions ( -D__BIG_ENDIAN__ ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    add_definitions ( -D__LITTLE_ENDIAN__ ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  unset ( _SYSTEM_BIG_ENDIAN ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-19 08:02:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-03 11:25:34 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_IMAGE_OPENJPEG ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-09-17 14:17:00 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Special handling of Windows platform where openjpeg is always static.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENJPEG_DEFINES  "-DOPJ_STATIC" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-30 14:20:19 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENJPEG_DEFINES  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-09-17 14:17:00 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-08-03 11:25:34 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-03-19 15:41:41 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( NOT  WITH_SYSTEM_EIGEN3 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( EIGEN3_INCLUDE_DIRS  ${ CMAKE_SOURCE_DIR } /extern/Eigen3 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2008-10-07 17:13:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 15:11:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_OPENVDB ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  OPENVDB_DEFINITIONS  -DWITH_OPENVDB ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_OPENVDB_3_ABI_COMPATIBLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  OPENVDB_DEFINITIONS  -DOPENVDB_3_ABI_COMPATIBLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-10 18:17:23 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # OpenVDB headers use deprecated TBB headers, silence warning.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  OPENVDB_DEFINITIONS  -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-02-26 15:11:24 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  list ( APPEND  OPENVDB_INCLUDE_DIRS 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ { B O O S T _ I N C L U D E _ D I R } 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ { T B B _ I N C L U D E _ D I R S } 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    $ { O P E N E X R _ I N C L U D E _ D I R S } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  OPENVDB_LIBRARIES  ${ OPENEXR_LIBRARIES }  ${ ZLIB_LIBRARIES } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_OPENVDB_BLOSC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  OPENVDB_DEFINITIONS  -DWITH_OPENVDB_BLOSC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  OPENVDB_LIBRARIES  ${ BLOSC_LIBRARIES }  ${ ZLIB_LIBRARIES } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  OPENVDB_LIBRARIES  ${ BOOST_LIBRARIES }  ${ TBB_LIBRARIES } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure OpenGL.
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-06-27 22:48:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								find_package ( OpenGL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-08 05:39:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								blender_include_dirs_sys ( "${OPENGL_INCLUDE_DIR}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-15 20:17:16 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_OPENGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_definitions ( -DWITH_OPENGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_SYSTEM_GLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  find_package_wrapper ( OpenGLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-05-11 16:38:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_SYSTEM_GLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " U n a b l e  t o  f i n d  O p e n G L  E S  l i b r a r i e s .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " I n s t a l l  t h e m  o r  d i s a b l e  W I T H _ S Y S T E M _ G L E S . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-01-28 10:32:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  "${OPENGLES_LIBRARY}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENGLES_LIBRARY  ""  CACHE  FILEPATH  "OpenGL ES 2.0 library file" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( OPENGLES_LIBRARY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  "${OPENGLES_LIBRARY}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " T o  c o m p i l e  W I T H _ G L _ E G L  y o u  n e e d  t o  s e t  O P E N G L E S _ L I B R A R Y  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " t o  t h e  f i l e  p a t h  o f  a n  O p e n G L  E S  2 . 0  l i b r a r y . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENGLES_DLL  ""  CACHE  FILEPATH  "OpenGL ES 2.0 redistributable DLL file" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( OPENGLES_DLL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_DLL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " T o  c o m p i l e  W I T H _ G L _ P R O F I L E _ E S 2 0  y o u  n e e d  t o  s e t  O P E N G L E S _ D L L  t o  t h e  f i l e  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " p a t h  o f  a n  O p e n G L  E S  2 . 0  r u n t i m e  d y n a m i c  l i n k  library  ( DLL ) . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( WITH_GL_ANGLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      list ( APPEND  GL_DEFINITIONS  -DWITH_ANGLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( D3DCOMPILER_DLL  ""  CACHE  FILEPATH  "Direct3D Compiler redistributable DLL file (needed by ANGLE)" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      get_filename_component ( D3DCOMPILER_FILENAME  "${D3DCOMPILER_DLL}"  NAME ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      list ( APPEND  GL_DEFINITIONS  "-DD3DCOMPILER=\" \\\"${D3DCOMPILER_FILENAME}\\\"\"") 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      mark_as_advanced ( D3DCOMPILER_DLL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      if ( D3DCOMPILER_DLL  STREQUAL  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          " T o  c o m p i l e  W I T H _ G L _ A N G L E  y o u  n e e d  t o  s e t  D 3 D C O M P I L E R _ D L L  t o  t h e  f i l e  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          " p a t h  o f  a  c o p y  o f  t h e  D i r e c t X  r e d i s t r i b u t a b l e  D L L  f i l e :  D 3 D C o m p i l e r _ 4 6 . d l l " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-05-11 16:38:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-01-03 17:42:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( OpenGL_GL_PREFERENCE  STREQUAL  "LEGACY"  AND  OPENGL_gl_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-01-06 11:51:38 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  ${ OPENGL_gl_LIBRARY } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-01-03 17:42:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  ${ OPENGL_opengl_LIBRARY }  ${ OPENGL_glx_LIBRARY } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_GL_EGL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-28 10:32:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  find_package ( OpenGL  REQUIRED  EGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  BLENDER_GL_LIBRARIES  OpenGL::EGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  GL_DEFINITIONS  -DWITH_GL_EGL  -DGLEW_EGL  -DGLEW_INC_EGL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WITH_SYSTEM_GLES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_EGL_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " U n a b l e  t o  f i n d  O p e n G L  E S  l i b r a r i e s .  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " I n s t a l l  t h e m  o r  d i s a b l e  W I T H _ S Y S T E M _ G L E S . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-01-28 10:32:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  ${ OPENGLES_EGL_LIBRARY } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENGLES_EGL_LIBRARY  ""  CACHE  FILEPATH  "EGL library file" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( OPENGLES_EGL_LIBRARY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  BLENDER_GL_LIBRARIES  "${OPENGLES_LIBRARY}"  "${OPENGLES_EGL_LIBRARY}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-13 15:03:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_EGL_LIBRARY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " T o  c o m p i l e  W I T H _ G L _ E G L  y o u  n e e d  t o  s e t  O P E N G L E S _ E G L _ L I B R A R Y  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " t o  t h e  f i l e  p a t h  o f  a n  E G L  l i b r a r y . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( OPENGLES_EGL_DLL  ""  CACHE  FILEPATH  "EGL redistributable DLL file" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( OPENGLES_EGL_DLL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  OPENGLES_EGL_DLL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " T o  c o m p i l e  W I T H _ G L _ E G L  y o u  n e e d  t o  s e t  O P E N G L E S _ E G L _ D L L  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " t o  t h e  f i l e  p a t h  o f  a n  E G L  r u n t i m e  d y n a m i c  l i n k  library  ( DLL ) . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  GL_DEFINITIONS  -DWITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-05-11 16:38:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  list ( APPEND  GL_DEFINITIONS  -DWITH_GL_PROFILE_CORE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-11-19 11:33:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure OpenMP.
 
							 
						 
					
						
							
								
									
										
										
										
											2014-07-08 00:29:53 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_OPENMP ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-01-26 14:14:51 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  OPENMP_CUSTOM ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    find_package ( OpenMP ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-11-19 11:33:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( OPENMP_FOUND ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-02 18:09:06 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( NOT  WITH_OPENMP_STATIC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_C_FLAGS  " ${OpenMP_C_FLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      string ( APPEND  CMAKE_CXX_FLAGS  " ${OpenMP_CXX_FLAGS}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-02 18:09:06 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # Typically avoid adding flags as defines but we can't
 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-05 19:41:08 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # pass OpenMP flags to the linker for static builds, meaning
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-02 18:09:06 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # we can't add any OpenMP related flags to CFLAGS variables
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # since they're passed to the linker as well.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      add_definitions ( "${OpenMP_C_FLAGS}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-12-03 15:34:41 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      find_library_static ( OpenMP_LIBRARIES  gomp  ${ CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-02 18:09:06 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-19 11:33:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_OPENMP  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 15:51:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  mark_as_advanced ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    O p e n M P _ C _ F L A G S 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    O p e n M P _ C X X _ F L A G S 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-11-19 11:33:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure GLEW
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-06-23 13:42:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_SYSTEM_GLEW ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  find_package ( GLEW ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Note: There is an assumption here that the system GLEW is not a static library.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  GLEW_FOUND ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR  "GLEW is required to build Blender. Install it or disable WITH_SYSTEM_GLEW." ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-11-18 16:26:32 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( GLEW_INCLUDE_PATH  "${GLEW_INCLUDE_DIR}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-22 00:35:04 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( BLENDER_GLEW_LIBRARIES  ${ GLEW_LIBRARY } ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-23 13:42:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_GLEW_ES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GLEW_INCLUDE_PATH  "${CMAKE_SOURCE_DIR}/extern/glew-es/include" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  GL_DEFINITIONS  -DGLEW_STATIC  -DWITH_GLEW_ES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # These definitions remove APIs from glew.h, making GLEW smaller, and catching unguarded API usage
 
							 
						 
					
						
							
								
									
										
										
										
											2017-05-11 16:38:05 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( WITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      list ( APPEND  GL_DEFINITIONS  -DGLEW_ES_ONLY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # No ES functions are needed
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      list ( APPEND  GL_DEFINITIONS  -DGLEW_NO_ES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( WITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      if ( WITH_GL_EGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        list ( APPEND  GL_DEFINITIONS  -DGLEW_USE_LIB_ES20 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # ToDo: This is an experiment to eliminate ES 1 symbols,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # GLEW doesn't really properly provide this level of control
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # (for example, without modification it eliminates too many symbols)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # so there are lots of modifications to GLEW to make this work,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # and no attempt to make it work beyond Blender at this point.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      list ( APPEND  GL_DEFINITIONS  -DGL_ES_VERSION_1_0=0  -DGL_ES_VERSION_CL_1_1=0  -DGL_ES_VERSION_CM_1_1=0 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( BLENDER_GLEW_LIBRARIES  extern_glew_es  bf_intern_glew_mx ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GLEW_INCLUDE_PATH  "${CMAKE_SOURCE_DIR}/extern/glew/include" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  GL_DEFINITIONS  -DGLEW_STATIC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-10 08:12:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    # This won't affect the non-experimental glew library,
 
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    # but is used for conditional compilation elsewhere.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    list ( APPEND  GL_DEFINITIONS  -DGLEW_NO_ES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( BLENDER_GLEW_LIBRARIES  extern_glew ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-05 23:31:01 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-22 21:33:19 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								list ( APPEND  GL_DEFINITIONS  -DGLEW_NO_GLU ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-01-03 00:23:52 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure Bullet
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_BULLET  AND  WITH_SYSTEM_BULLET ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  find_package ( Bullet ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  BULLET_FOUND ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_BULLET  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( BULLET_INCLUDE_DIRS  "${CMAKE_SOURCE_DIR}/extern/bullet2/src" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # set(BULLET_LIBRARIES "")
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-24 00:14:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Configure Python.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_PYTHON_MODULE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_definitions ( -DPy_ENABLE_SHARED ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-09-30 15:51:58 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-24 00:14:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-01-04 16:47:36 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure GLog/GFlags
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_LIBMV  OR  WITH_GTESTS  OR  ( WITH_CYCLES  AND  WITH_CYCLES_LOGGING ) ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 10:58:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_SYSTEM_GFLAGS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    find_package ( Gflags ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  GFLAGS_FOUND ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR  "System wide Gflags is requested but was not found" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # FindGflags does not define this, and we are not even sure what to use here.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GFLAGS_DEFINES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GFLAGS_DEFINES 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      - D G F L A G S _ D L L _ D E F I N E _ F L A G = 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      - D G F L A G S _ D L L _ D E C L A R E _ F L A G = 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      - D G F L A G S _ D L L _ D E C L = 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GFLAGS_NAMESPACE  "gflags" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GFLAGS_LIBRARIES  extern_gflags ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GFLAGS_INCLUDE_DIRS  "${PROJECT_SOURCE_DIR}/extern/gflags/src" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 14:26:25 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_SYSTEM_GLOG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    find_package ( Glog ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  GLOG_FOUND ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      message ( FATAL_ERROR  "System wide Glog is requested but was not found" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # FindGlog does not define this, and we are not even sure what to use here.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GLOG_DEFINES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GLOG_DEFINES 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      - D G O O G L E _ G L O G _ D L L _ D E C L = 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( GLOG_LIBRARIES  extern_glog ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( GLOG_INCLUDE_DIRS  ${ CMAKE_SOURCE_DIR } /extern/glog/src/windows ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-03-23 14:32:18 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      set ( GLOG_INCLUDE_DIRS  ${ CMAKE_SOURCE_DIR } /extern/glog/include ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-04-21 14:26:25 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-04 16:47:36 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-01-04 18:11:12 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Configure Ceres
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_LIBMV ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-25 16:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # We always have C++11 which includes unordered_map.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-18 10:12:01 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  set ( CERES_DEFINES  "-DCERES_STD_UNORDERED_MAP;-DCERES_USE_CXX_THREADS" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-04 18:11:12 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.
Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.
This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.
Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.
On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).
Review task: D4780.
											 
										 
										
											2019-05-07 20:32:14 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Extra limits to number of jobs running in parallel for some kind os tasks.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Only supported by Ninja build system currently.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( "${CMAKE_GENERATOR}"  MATCHES  "Ninja"  AND  WITH_NINJA_POOL_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS  AND 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								     N O T  N I N J A _ M A X _ N U M _ P A R A L L E L _ C O M P I L E _ H E A V Y _ J O B S  A N D 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								     N O T  N I N J A _ M A X _ N U M _ P A R A L L E L _ L I N K _ J O B S ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Try to define good default values.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Max mem of heavy cpp files compilation: about 2.5GB
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Max mem during linking: about 3.3GB
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    cmake_host_system_information ( RESULT  _NUM_CORES  QUERY  NUMBER_OF_LOGICAL_CORES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Note: this gives mem in MB.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    cmake_host_system_information ( RESULT  _TOT_MEM  QUERY  TOTAL_PHYSICAL_MEMORY ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Heuristics... the more cores we have, the more free mem we have to keep for the non-heavy tasks too.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( ${ _TOT_MEM }  LESS  8000  AND  ${ _NUM_CORES }  GREATER  2 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "1" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    elseif ( ${ _TOT_MEM }  LESS  16000  AND  ${ _NUM_CORES }  GREATER  4 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "2" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    elseif ( ${ _TOT_MEM }  LESS  24000  AND  ${ _NUM_CORES }  GREATER  8 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "3" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    elseif ( ${ _TOT_MEM }  LESS  32000  AND  ${ _NUM_CORES }  GREATER  16 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "4" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    elseif ( ${ _TOT_MEM }  LESS  64000  AND  ${ _NUM_CORES }  GREATER  32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "8" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_heavy_jobs  "" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS  "${_compile_heavy_jobs}"  CACHE  STRING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " D e f i n e  t h e  m a x i m u m  n u m b e r  o f  c o n c u r r e n t  h e a v y  c o m p i l a t i o n  j o b s ,  f o r  n i n j a  b u i l d  system  ( used  for  some  targets  which  cpp  files  can  take  several  GB  each  during  compilation ) . "  F O R C E ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( _compile_heavy_jobs ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Only set regular compile jobs if we set heavy jobs, otherwise default (using all cores) if fine.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      math ( EXPR  _compile_jobs  "${_NUM_CORES} - 1" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    else ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( _compile_jobs  "" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS  "${_compile_jobs}"  CACHE  STRING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " D e f i n e  t h e  m a x i m u m  n u m b e r  o f  c o n c u r r e n t  c o m p i l a t i o n  j o b s ,  f o r  n i n j a  b u i l d  s y s t e m . "  F O R C E ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( _compile_jobs ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # In practice, even when there is RAM available, this proves to be quicker than running in parallel
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # (due to slow disks accesses).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( NINJA_MAX_NUM_PARALLEL_LINK_JOBS  "1"  CACHE  STRING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " D e f i n e  t h e  m a x i m u m  n u m b e r  o f  c o n c u r r e n t  l i n k  j o b s ,  f o r  n i n j a  b u i l d  s y s t e m . "  F O R C E ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    mark_as_advanced ( NINJA_MAX_NUM_PARALLEL_LINK_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( _NUM_CORES ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( _TOT_MEM ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set_property ( GLOBAL  APPEND  PROPERTY  JOB_POOLS  compile_job_pool= ${ NINJA_MAX_NUM_PARALLEL_COMPILE_JOBS } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( CMAKE_JOB_POOL_COMPILE  compile_job_pool ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set_property ( GLOBAL  APPEND  PROPERTY  JOB_POOLS  compile_heavy_job_pool= ${ NINJA_MAX_NUM_PARALLEL_COMPILE_HEAVY_JOBS } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NINJA_MAX_NUM_PARALLEL_LINK_JOBS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set_property ( GLOBAL  APPEND  PROPERTY  JOB_POOLS  link_job_pool= ${ NINJA_MAX_NUM_PARALLEL_LINK_JOBS } ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( CMAKE_JOB_POOL_LINK  link_job_pool ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-03-24 00:14:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								# Extra compile flags
 
							 
						 
					
						
							
								
									
										
										
										
											2010-10-18 12:35:40 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-10-17 06:38:56 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( CMAKE_COMPILER_IS_GNUCC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-16 09:55:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-21 03:32:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_CAST_ALIGN  -Wcast-align ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION  -Werror=implicit-function-declaration ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-15 01:52:28 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ERROR_RETURN_TYPE   -Werror=return-type ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-11-22 17:12:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ERROR_VLA  -Werror=vla ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-03-15 22:30:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-15 01:52:28 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_STRICT_PROTOTYPES   -Wstrict-prototypes ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_MISSING_PROTOTYPES  -Wmissing-prototypes ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-21 03:32:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_CHAR_SUBSCRIPTS  -Wno-char-subscripts ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_UNKNOWN_PRAGMAS  -Wno-unknown-pragmas ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_POINTER_ARITH  -Wpointer-arith ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_UNUSED_PARAMETER  -Wunused-parameter ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_WRITE_STRINGS  -Wwrite-strings ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-16 01:35:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_LOGICAL_OP  -Wlogical-op ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_UNDEF  -Wundef ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_INIT_SELF  -Winit-self )   # needs -Wuninitialized
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-20 01:02:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_MISSING_INCLUDE_DIRS  -Wmissing-include-dirs ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_DIV_BY_ZERO  -Wno-div-by-zero ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-07-19 10:39:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_TYPE_LIMITS  -Wtype-limits ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-24 19:11:02 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_FORMAT_SIGN  -Wformat-signedness ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-05 12:08:17 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_RESTRICT  -Wrestrict ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-07 12:20:49 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # C-only.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_NULL  -Wnonnull ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ABSOLUTE_VALUE  -Wabsolute-value ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:29:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # gcc 4.2 gives annoying warnings on every file with this
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-24 12:13:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "4.3" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:29:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_UNINITIALIZED  -Wuninitialized ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-08 11:10:21 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_UNINITIALIZED  -Wuninitialized ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:29:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-14 13:00:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # versions before gcc4.6 give many BLI_math warnings
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-24 12:13:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "4.6" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_REDUNDANT_DECLS        -Wredundant-decls ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_REDUNDANT_DECLS  -Wredundant-decls ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-14 13:00:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-23 15:45:52 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # versions before gcc4.8 include global name-space.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "4.8" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_SHADOW  -Wshadow ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-04-03 10:04:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # disable because it gives warnings for printf() & friends.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-01-01 16:46:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE  -Wno-error=unused-but-set-variable ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-21 03:32:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_INVALID_OFFSETOF  -Wno-invalid-offsetof ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_SIGN_COMPARE  -Wno-sign-compare ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-16 01:35:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_LOGICAL_OP  -Wlogical-op ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_INIT_SELF  -Winit-self )   # needs -Wuninitialized
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-20 01:02:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_MISSING_INCLUDE_DIRS  -Wmissing-include-dirs ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_DIV_BY_ZERO  -Wno-div-by-zero ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-07-19 10:39:25 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_TYPE_LIMITS  -Wtype-limits ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-27 15:55:58 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_ERROR_RETURN_TYPE   -Werror=return-type ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_CHAR_SUBSCRIPTS  -Wno-char-subscripts ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_UNKNOWN_PRAGMAS  -Wno-unknown-pragmas ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_POINTER_ARITH  -Wpointer-arith ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_UNUSED_PARAMETER  -Wunused-parameter ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_WRITE_STRINGS  -Wwrite-strings ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_UNDEF  -Wundef ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-04-24 19:11:02 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_FORMAT_SIGN  -Wformat-signedness ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-05 12:08:17 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_RESTRICT  -Wrestrict ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:29:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # gcc 4.2 gives annoying warnings on every file with this
 
							 
						 
					
						
							
								
									
										
										
										
											2013-03-24 12:13:13 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "4.3" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:29:07 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_UNINITIALIZED  -Wuninitialized ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-10-01 16:45:50 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # causes too many warnings
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_UNDEF  -Wundef ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_MISSING_DECLARATIONS  -Wmissing-declarations ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-05-20 14:01:03 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Use 'ATTR_FALLTHROUGH' macro to suppress.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( CMAKE_COMPILER_IS_GNUCC  AND  ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "7.0" ) ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_IMPLICIT_FALLTHROUGH  -Wimplicit-fallthrough=5 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_IMPLICIT_FALLTHROUGH  -Wimplicit-fallthrough=5 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-30 04:48:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # flags to undo strict flags
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_DEPRECATED_DECLARATIONS  -Wno-deprecated-declarations ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_PARAMETER         -Wno-unused-parameter ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_FUNCTION          -Wno-unused-function ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_TYPE_LIMITS              -Wno-type-limits ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_INT_IN_BOOL_CONTEXT      -Wno-int-in-bool-context ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_FORMAT                   -Wno-format ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_SWITCH                   -Wno-switch ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-13 11:51:49 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_VARIABLE          -Wno-unused-variable ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-08 11:10:21 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_VARIABLE          -Wno-uninitialized ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:07:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_CLASS_MEMACCESS      -Wno-class-memaccess ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-11 12:04:31 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_COMMENT              -Wno-comment ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_TYPEDEFS      -Wno-unused-local-typedefs ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-13 11:51:49 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_VARIABLE      -Wno-unused-variable ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-08 11:10:21 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_VARIABLE      -Wno-uninitialized ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-05-22 11:08:10 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( CMAKE_COMPILER_IS_GNUCC  AND  ( NOT  "${CMAKE_C_COMPILER_VERSION}"  VERSION_LESS  "7.0" ) ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_IMPLICIT_FALLTHROUGH     -Wno-implicit-fallthrough ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-05-22 11:08:10 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-01-01 16:46:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  APPLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE  -Wno-error=unused-but-set-variable ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-01 16:46:08 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-10-30 04:48:00 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-12-02 11:36:33 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( CMAKE_C_COMPILER_ID  MATCHES  "Clang" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-11 12:13:41 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-10-05 10:50:02 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # strange, clang complains these are not supported, but then uses them.
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-11 12:13:41 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-26 21:58:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION  -Werror=implicit-function-declaration ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ERROR_RETURN_TYPE   -Werror=return-type ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-11 12:13:41 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_AUTOLOGICAL_COMPARE  -Wno-tautological-compare ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_UNKNOWN_PRAGMAS  -Wno-unknown-pragmas ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_CHAR_SUBSCRIPTS  -Wno-char-subscripts ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-15 01:52:28 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_STRICT_PROTOTYPES   -Wstrict-prototypes ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_MISSING_PROTOTYPES  -Wmissing-prototypes ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-26 21:58:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_UNUSED_PARAMETER  -Wunused-parameter ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-09-20 09:19:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_AUTOLOGICAL_COMPARE  -Wno-tautological-compare ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_UNKNOWN_PRAGMAS      -Wno-unknown-pragmas ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_CHAR_SUBSCRIPTS      -Wno-char-subscripts ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_OVERLOADED_VIRTUAL   -Wno-overloaded-virtual )   # we get a lot of these, if its a problem a dev needs to look into it.
 
							 
						 
					
						
							
								
									
										
										
										
											2013-02-26 21:58:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_SIGN_COMPARE         -Wno-sign-compare ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-20 09:19:49 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_INVALID_OFFSETOF     -Wno-invalid-offsetof ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-02-26 21:58:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # gives too many unfixable warnings
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS      -Wunused-macros)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNUSED_MACROS          -Wunused-macros)
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-03-14 07:25:54 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # flags to undo strict flags
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_PARAMETER  -Wno-unused-parameter ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 11:06:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_VARIABLE   -Wno-unused-variable ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_MACROS     -Wno-unused-macros ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-09 12:06:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_MISLEADING_INDENTATION     -Wno-misleading-indentation ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:17:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_MISSING_VARIABLE_DECLARATIONS  -Wno-missing-variable-declarations ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_INCOMPAT_PTR_DISCARD_QUAL  -Wno-incompatible-pointer-types-discards-qualifiers ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNUSED_FUNCTION  -Wno-unused-function ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_INT_TO_VOID_POINTER_CAST  -Wno-int-to-void-pointer-cast ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_MISSING_PROTOTYPES  -Wno-missing-prototypes ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_DUPLICATE_ENUM  -Wno-duplicate-enum ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_UNDEF  -Wno-undef ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_REMOVE_STRICT_FLAGS  C_WARN_NO_MISSING_NORETURN  -Wno-missing-noreturn ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-09 12:06:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_PARAMETER  -Wno-unused-parameter ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:07:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_PRIVATE_FIELD  -Wno-unused-private-field ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_CXX11_NARROWING  -Wno-c++11-narrowing ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_NON_VIRTUAL_DTOR  -Wno-non-virtual-dtor ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_MACROS  -Wno-unused-macros ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-13 11:51:49 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_VARIABLE   -Wno-unused-variable ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-22 14:07:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_REORDER  -Wno-reorder ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-11 12:04:31 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_COMMENT  -Wno-comment ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNUSED_TYPEDEFS  -Wno-unused-local-typedefs ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-02-20 11:06:40 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_UNDEFINED_VAR_TEMPLATE  -Wno-undefined-var-template ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_INSTANTIATION_AFTER_SPECIALIZATION  -Wno-instantiation-after-specialization ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-09 12:06:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_REMOVE_STRICT_FLAGS  CXX_WARN_NO_MISLEADING_INDENTATION     -Wno-misleading-indentation ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-07-15 08:26:16 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-16 09:55:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( CMAKE_C_COMPILER_ID  MATCHES  "Intel" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-21 03:32:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_POINTER_ARITH  -Wpointer-arith ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_WARNINGS  C_WARN_NO_UNKNOWN_PRAGMAS  -Wno-unknown-pragmas ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-16 09:55:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-21 03:32:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_ALL  -Wall ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_INVALID_OFFSETOF  -Wno-invalid-offsetof ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_WARNINGS  CXX_WARN_NO_SIGN_COMPARE  -Wno-sign-compare ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-16 09:55:35 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-10-01 21:09:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # disable numbered, false positives
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( APPEND  C_WARNINGS  " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  string ( APPEND  CXX_WARNINGS  " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( CMAKE_C_COMPILER_ID  MATCHES  "MSVC" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # most msvc warnings are C & C++
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( _WARNINGS 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # warning level:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / W 3 " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w 3 4 0 6 2 "   # switch statement contains 'default' but no 'case' labels
 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-22 16:15:46 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w 3 4 1 1 5 "   # 'type' : named type definition in parentheses
 
							 
						 
					
						
							
								
									
										
										
										
											2018-08-29 13:08:00 -03:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w 3 4 1 8 9 "   # local variable is initialized but not referenced
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    # disable:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 0 1 8 "   # signed/unsigned mismatch
 
							 
						 
					
						
							
								
									
										
										
										
											2015-12-21 14:54:36 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w d 4 1 4 6 "   # unary minus operator applied to unsigned type, result still unsigned
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w d 4 0 6 5 "   # switch statement contains 'default' but no 'case' labels
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 1 2 7 "   # conditional expression is constant
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 1 8 1 "   # qualifier applied to reference type; ignored
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 2 0 0 "   # zero-sized array in struct/union
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 2 4 4 "   # conversion from 'type1' to 'type2', possible loss of data
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 2 6 7 "   # conversion from 'size_t' to 'type', possible loss of data
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 3 0 5 "   # truncation from 'type1' to 'type2'
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w d 4 8 0 0 "   # forcing value to bool 'true' or 'false'
 
							 
						 
					
						
							
								
									
										
										
										
											2018-06-10 08:12:13 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w d 4 8 2 8 "   # The file contains a character that is illegal
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-25 11:05:01 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w d 4 9 9 6 "   # identifier was declared deprecated
 
							 
						 
					
						
							
								
									
										
										
										
											2019-05-26 16:13:31 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w d 4 6 6 1 "   # no suitable definition provided for explicit template instantiation request
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    # errors:
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    " / w e 4 0 1 3 "   # 'function' undefined; assuming extern returning int
 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-28 12:59:28 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w e 4 1 3 3 "   # incompatible pointer types
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    " / w e 4 4 3 1 "   # missing type specifier - int assumed
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-11-29 16:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( MSVC_VERSION  GREATER_EQUAL  1911 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # see https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/c5038?view=vs-2017
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    string ( APPEND  _WARNINGS  " /w35038" )  # order of initialization in c++ constructors
 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-29 16:56:33 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-11-08 21:17:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( REPLACE  ";"  " "  _WARNINGS  "${_WARNINGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( C_WARNINGS  "${_WARNINGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( CXX_WARNINGS  "${_WARNINGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  unset ( _WARNINGS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2010-10-17 06:38:56 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-07-16 06:55:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# ensure python header is found since detection can fail, this could happen
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# with _any_ library but since we used a fixed python version this tends to
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# be most problematic.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_PYTHON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  EXISTS  "${PYTHON_INCLUDE_DIR}/Python.h" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( FATAL_ERROR 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " M i s s i n g :  \ " $ { P Y T H O N _ I N C L U D E _ D I R } / P y t h o n . h \ " , \ n " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " S e t  t h e  c a c h e  e n t r y  ' P Y T H O N _ I N C L U D E _ D I R '  t o  p o i n t  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " t o  a  v a l i d  p y t h o n  i n c l u d e  p a t h .  C o n t a i n i n g  " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " P y t h o n . h  f o r  p y t h o n  v e r s i o n  \ " $ { P Y T H O N _ V E R S I O N } \ " " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-16 06:55:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-09-17 11:10:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WIN32  OR  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # Windows and macOS have this bundled with Python libraries.
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  elseif ( ( WITH_PYTHON_INSTALL  AND  WITH_PYTHON_INSTALL_NUMPY )  OR  WITH_PYTHON_NUMPY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( ( "${PYTHON_NUMPY_PATH}"  STREQUAL  "" )  OR  ( ${ PYTHON_NUMPY_PATH }  MATCHES  NOTFOUND ) ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      find_python_package ( numpy  "core/include" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-08-18 08:24:12 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-30 09:38:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-03-05 05:39:53 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WIN32  OR  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    # pass, we have this in lib/python/site-packages
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  elseif ( WITH_PYTHON_INSTALL_REQUESTS ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-14 16:40:00 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    find_python_package ( requests  "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-05 05:39:53 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-16 06:55:45 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-01 12:36:11 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( MSVC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( APPEND  CMAKE_CXX_FLAGS  " /std:c++17" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 22:25:40 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Make MSVC properly report the value of the __cplusplus preprocessor macro
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
 
							 
						 
					
						
							
								
									
										
										
										
											2020-09-12 16:06:24 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # of the C++ standard chosen above
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 22:25:40 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( MSVC_VERSION  GREATER  1913 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    string ( APPEND  CMAKE_CXX_FLAGS  " /Zc:__cplusplus" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-08-26 22:25:40 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-01 12:36:11 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( 
							 
						 
					
						
							
								
									
										
										
										
											2018-07-25 16:59:46 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  C M A K E _ C O M P I L E R _ I S _ G N U C C  O R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  C M A K E _ C _ C O M P I L E R _ I D  M A T C H E S  " C l a n g "  O R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  C M A K E _ C _ C O M P I L E R _ I D  M A T C H E S  " I n t e l " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( APPEND  CMAKE_CXX_FLAGS  " -std=c++17" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-22 13:41:55 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-06-19 14:44:03 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( FATAL_ERROR  "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++17 build" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-02-09 22:23:21 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-11-23 08:31:29 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Visual Studio has all standards it supports available by default
 
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												Windows: Add support for building with clang.
This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming
Things to note:
1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)
2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)
victor_cpu
	msvc:3099.51
	clang:2796.43
pavillon_barcelona_cpu
	msvc:1872.05
	clang:1827.72
koro_cpu
	msvc:1097.58
	clang:1006.51
fishy_cat_cpu
	msvc:815.37
	clang:722.2
classroom_cpu
	msvc:1705.39
	clang:1575.43
bmw27_cpu
	msvc:552.38
	clang:561.53
barbershop_interior_cpu
	msvc:2134.93
	clang:1922.33
3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.
4) X64 only currently, X86 builds but crashes on startup.
5) Tested with llvm/clang 6.0.0
6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration
7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.
8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.
9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3304
											 
										 
										
											2018-05-28 14:34:47 -06:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Clang on windows copies this behavior and does not support these switches
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  C M A K E _ C O M P I L E R _ I S _ G N U C C  O R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ( C M A K E _ C _ C O M P I L E R _ I D  M A T C H E S  " C l a n g "  AND  ( NOT  MSVC ) )  O R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ( C M A K E _ C _ C O M P I L E R _ I D  M A T C H E S  " I n t e l " ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
									
										
										
										
											2018-09-28 10:06:59 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  # Use C11 + GNU extensions, works with GCC, Clang, ICC
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  string ( APPEND  CMAKE_C_FLAGS  " -std=gnu11" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-11-22 17:12:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-10-09 17:14:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( UNIX  AND  NOT  APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_CXX11_ABI ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    string ( APPEND  PLATFORM_CFLAGS  " -D_GLIBCXX_USE_CXX11_ABI=0" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-10-09 17:14:00 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_COMPILER_SHORT_FILE_MACRO ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 21:00:29 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  ADD_CHECK_C_COMPILER_FLAG ( C_PREFIX_MAP_FLAGS  C_MACRO_PREFIX_MAP  -fmacro-prefix-map=foo=bar ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  ADD_CHECK_CXX_COMPILER_FLAG ( CXX_PREFIX_MAP_FLAGS  CXX_MACRO_PREFIX_MAP  -fmacro-prefix-map=foo=bar ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( C_MACRO_PREFIX_MAP  AND  CXX_MACRO_PREFIX_MAP ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    if ( APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      if ( XCODE  AND  ${ XCODE_VERSION }  VERSION_LESS  12.0 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 21:00:29 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # Developers may have say LLVM Clang-10.0.1 toolchain (which supports the flag)
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      # with Xcode-11 (the Clang of which doesn't support the flag).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        message ( WARNING 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								          " - f m a c r o - p r e f i x - m a p  f l a g  i s  N O T  s u p p o r t e d  b y  C l a n g  s h i p p e d  w i t h  X c o d e - $ { X C O D E _ V E R S I O N } . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								          "  S o m e  X c o d e  f u n c t i o n a l i t y  i n  P r o d u c t  m e n u  m a y  n o t  w o r k .  D i s a b l i n g  W I T H _ C O M P I L E R _ S H O R T _ F I L E _ M A C R O . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        set ( WITH_COMPILER_SHORT_FILE_MACRO  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( WITH_COMPILER_SHORT_FILE_MACRO ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 15:59:59 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      path_ensure_trailing_slash ( _src_dir  "${CMAKE_SOURCE_DIR}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      path_ensure_trailing_slash ( _bin_dir  "${CMAKE_BINARY_DIR}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 18:38:49 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      # Keep this variable so it can be stripped from build-info.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      set ( PLATFORM_CFLAGS_FMACRO_PREFIX_MAP 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        " - f m a c r o - p r e f i x - m a p = \ " $ { _ s r c _ d i r } \ " = \ " \ "  - f m a c r o - p r e f i x - m a p = \ " $ { _ b i n _ d i r } \ " = \ " \ " " ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  PLATFORM_CFLAGS  " ${PLATFORM_CFLAGS_FMACRO_PREFIX_MAP}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 15:59:59 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      unset ( _src_dir ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      unset ( _bin_dir ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  else ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-04 21:00:29 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    message ( WARNING 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      " - f m a c r o - p r e f i x - m a p  f l a g  i s  N O T  s u p p o r t e d  b y  C / C + +  c o m p i l e r . " 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-02 15:10:10 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      "  D i s a b l i n g  W I T H _ C O M P I L E R _ S H O R T _ F I L E _ M A C R O . " 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    set ( WITH_COMPILER_SHORT_FILE_MACRO  OFF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2012-10-20 13:08:51 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# Include warnings first, so its possible to disable them with user defined flags
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# eg: -Wno-uninitialized
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( CMAKE_C_FLAGS  "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								set ( CMAKE_CXX_FLAGS  "${CXX_WARNINGS} ${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-19 16:20:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-04-27 21:40:18 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# defined above, platform specific but shared names
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-28 04:32:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								mark_as_advanced ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  C Y C L E S _ O S L 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  O S L _ L I B _ E X E C 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  O S L _ C O M P I L E R 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  O S L _ L I B _ C O M P 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  O S L _ L I B _ Q U E R Y 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-12-29 14:48:21 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  O S L _ I N C L U D E _ D I R 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-28 04:32:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								mark_as_advanced ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  L L V M _ C O N F I G 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-03-05 15:36:22 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  L L V M _ R O O T _ D I R 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-08-28 04:32:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  L L V M _ L I B R A R Y 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  L L V M _ V E R S I O N 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-20 23:39:29 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-------------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Global Defines
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-05-24 06:44:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# better not set includes here but this debugging option is off by default.
 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-19 16:20:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_CXX_GUARDEDALLOC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-05-24 06:44:39 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  include_directories ( ${ CMAKE_SOURCE_DIR } /intern/guardedalloc ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-06-25 10:35:24 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_definitions ( -DWITH_CXX_GUARDEDALLOC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-19 16:20:12 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-15 10:22:26 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_ASSERT_ABORT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_definitions ( -DWITH_ASSERT_ABORT ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2010-12-16 12:48:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								# message(STATUS "Using CFLAGS: ${CMAKE_C_FLAGS}")
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# message(STATUS "Using CXXFLAGS: ${CMAKE_CXX_FLAGS}")
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Libraries
 
							 
						 
					
						
							
								
									
										
										
										
											2010-12-06 10:56:37 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-04-16 15:54:36 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_BLENDER ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-01-20 20:41:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( extern ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-06-18 22:49:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # source after intern and extern to gather all
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  # internal and external library information first, for test linking
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( source ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-01-20 20:41:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								elseif ( WITH_CYCLES_STANDALONE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-18 07:43:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/glew-mx ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/guardedalloc ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/libc_compat ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/numaapi ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/sky ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-01-20 20:41:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_subdirectory ( intern/cycles ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-09-14 17:40:34 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  add_subdirectory ( extern/clew ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-18 07:43:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_CYCLES_LOGGING ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    if ( NOT  WITH_SYSTEM_GFLAGS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								      add_subdirectory ( extern/gflags ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    add_subdirectory ( extern/glog ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-01-14 12:24:09 +05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( WITH_CUDA_DYNLOAD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    add_subdirectory ( extern/cuew ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-01-25 14:19:32 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( NOT  WITH_SYSTEM_GLEW ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-01-20 20:41:54 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    add_subdirectory ( extern/glew ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-01-11 11:29:30 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Testing
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								add_subdirectory ( tests ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Blender Application
 
							 
						 
					
						
							
								
									
										
										
										
											2011-07-13 08:15:06 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								if ( WITH_BLENDER ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  add_subdirectory ( source/creator ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2006-11-17 02:27:12 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-09-09 21:15:30 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
											 
										 
										
											
												CMake: Add support of Ninja's pools to ease building on limited amount of RAM.
Many modern computers support a lot of threads (parrallel building
jobs), but are somewhat restricted in memory, when some building jobs
can require several GB each.
Ninja builder has pools, which extend the usual `-j X` make
parallelizing option, by allowing to specify different numbers of
parallel jobs for different targets.
This commit defines three pools, one for linking, one for usual compile,
and one for compiling some 'heavy' cpp libs, when a single file can
require GB of RAM in full debug builds.
Simply enabling WITH_NINJA_POOL_JOBS will try to set default sensible
values for those three pools based on your machine specifications, you
can then tweak further the values of NINJA_MAX_NUM_PARALLEL_ settings,
if you like.
On my system (8 cores, 16GB RAM), it allows to build a full debug with
all ASAN options build with roughly 7GB of RAM used at most, pretty much
as quickly as without that option (which would require up to 11GB of
available RAM at some points).
Review task: D4780.
											 
										 
										
											2019-05-07 20:32:14 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Define 'heavy' submodules (for Ninja builder when using pools).
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								setup_heavy_lib_pool ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-02-15 18:33:05 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# CPack for generating packages
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								include ( build_files/cmake/packaging.cmake ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-07-18 15:16:45 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Use dynamic loading for OpenMP
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( WITH_BLENDER ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  openmp_delayload ( blender ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-30 12:58:44 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								#-----------------------------------------------------------------------------
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# Print Final Configuration
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( FIRST_RUN ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  set ( _config_msg  "\nBlender Configuration\n=====================" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  function ( info_cfg_option 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    _ s e t t i n g 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( _msg  "  - ${_setting}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    string ( LENGTH  "${_msg}"  _len ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-30 09:38:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    while ( "32"  GREATER  "${_len}" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 10:29:04 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      string ( APPEND  _msg  " " ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-05-18 11:58:08 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								      math ( EXPR  _len  "${_len} + 1" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    endwhile ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( _config_msg  "${_config_msg}\n${_msg}${${_setting}}"  PARENT_SCOPE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endfunction ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  function ( info_cfg_text 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    _ t e x t 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2015-06-17 09:16:17 +10:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    set ( _config_msg  "${_config_msg}\n\n  ${_text}"  PARENT_SCOPE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endfunction ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2013-12-02 11:36:33 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( STATUS  "C Compiler:   \" ${ CMAKE_C_COMPILER_ID } \"") 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  message ( STATUS  "C++ Compiler: \" ${ CMAKE_CXX_COMPILER_ID } \"") 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Build Options:" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_ALEMBIC ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_BULLET ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-11-07 17:13:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_CYCLES ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_FFTW3 ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2013-05-24 10:15:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_FREESTYLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_GMP ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-02-01 21:58:57 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_HARU ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IK_ITASC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IK_SOLVER ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_INPUT_NDOF ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_INTERNATIONAL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENCOLLADA ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-09-15 10:03:17 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENCOLORIO ) 
 
							 
						 
					
						
							
								
									
										
										
											
												Compositor: Added denoising node
This node is built on Intel's OpenImageDenoise library.
Other denoisers could be integrated, for example Lukas' Cycles denoiser.
Compositor: Made OpenImageDenoise optional, added CMake and build_env files to find OIDN
Compositor: Fixed some warnings in the denoising operator
build_environment: Updated OpenImageDenoise to 0.8.1
build_environment: Updated OpenImageDenoise in `make deps` for macOS
Reviewers: sergey, jbakker, brecht
Reviewed By: brecht
Subscribers: YAFU, LazyDodo, Zen_YS, slumber, samgreen, tjvoll, yeus, ponomarovmax, getrad, coder.kalyan, vitos1k, Yegor, DeepBlender, kumaran7, Darkfie9825, aliasguru, aafra, ace_dragon, juang3d, pandrodor, cdog, lordodin, jtheninja, mavek, marcog, 5k1n2, Atair, rawalanche, 0o00o0oo, filibis, poor, lukasstockner97
Tags: #compositing
Differential Revision: https://developer.blender.org/D4304
											 
										 
										
											2019-08-14 15:30:26 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENIMAGEDENOISE ) 
 
							 
						 
					
						
							
								
									
										
										
											
												Implementation of OpenVDB as a possible cache format for smoke
simulations.
This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.
A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.
A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB
Reviewers: sergey, lukastoenne, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht
Differential Revision: https://developer.blender.org/D1721
											 
										 
										
											2016-01-23 08:39:29 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENVDB ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2021-01-26 15:27:57 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_POTRACE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_PUGIXML ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-08-26 18:34:11 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_QUADRIFLOW ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-04 23:58:48 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_TBB ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_USD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_XR_OPENXR ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Compiler Options:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_BUILDINFO ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENMP ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "System Options:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_INSTALL_PORTABLE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_MEM_JEMALLOC ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_MEM_VALGRIND ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_SYSTEM_GLEW ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-09 21:07:58 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_X11_ALPHA ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-01-02 12:25:14 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_X11_XF86VMODE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2017-10-25 20:12:12 +11:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_X11_XFIXES ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_X11_XINPUT ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Image Formats:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_CINEON ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_DDS ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_HDR ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_OPENEXR ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_OPENJPEG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_IMAGE_TIFF ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENIMAGEIO ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Audio:" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-10-08 02:51:42 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_CODEC_AVI ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_CODEC_FFMPEG ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_CODEC_SNDFILE ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_JACK ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_JACK_DYNLOAD ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_OPENAL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_SDL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_SDL_DYNLOAD ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Compression:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_LZMA ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_LZO ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Python:" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  if ( APPLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    info_cfg_option ( WITH_PYTHON_FRAMEWORK ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_PYTHON_INSTALL ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2012-04-30 09:38:32 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_PYTHON_INSTALL_NUMPY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_PYTHON_MODULE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_PYTHON_SAFETY ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "Modifiers:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_MOD_FLUID ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2011-11-13 14:16:43 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_MOD_OCEANSIM ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_MOD_REMESH ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-10-07 15:46:19 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "OpenGL:" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  if ( WIN32 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    info_cfg_option ( WITH_GL_ANGLE ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-11-06 12:45:25 +05:30 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_GL_EGL ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_GL_PROFILE_ES20 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  info_cfg_option ( WITH_GLEW_ES ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  info_cfg_text ( "" ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-17 06:35:54 +02:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2011-06-19 13:49:20 +00:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								  message ( "${_config_msg}" ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( ) 
 
							 
						 
					
						
							
								
									
										
										
										
											2014-11-16 12:57:42 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								if ( 0 ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								  print_all_vars ( ) 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								endif ( )