From 4da2acae3ab1a40db8be7f7df36da29cfcbf280c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 3 Sep 2018 16:49:08 +0200 Subject: Spelling fixes in comments and descriptions, patch by luzpaz. Differential Revision: https://developer.blender.org/D3668 --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 697f7345d4b..c9e650b26a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,10 +210,10 @@ option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON) option(WITH_PYTHON "Enable Embedded Python API (only disable for development)" ON) option(WITH_PYTHON_SECURITY "Disables execution of scripts within blend files by default" ON) -mark_as_advanced(WITH_PYTHON) # dont want people disabling this unless they really know what they are doing. +mark_as_advanced(WITH_PYTHON) # don't want people disabling this unless they really know what they are doing. mark_as_advanced(WITH_PYTHON_SECURITY) # some distributions see this as a security issue, rather than have them patch it, make a build option. -option(WITH_PYTHON_SAFETY "Enable internal API error checking to track invalid data to prevent crash on access (at the expense of some effeciency, only enable for development)." OFF) +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) mark_as_advanced(WITH_PYTHON_SAFETY) 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) if(APPLE) @@ -225,8 +225,8 @@ if(${CMAKE_VERSION} VERSION_LESS 2.8.8) # add_library OBJECT arg unsupported set(WITH_BUILDINFO OFF) endif() -set(BUILDINFO_OVERRIDE_DATE "" CACHE STRING "Use instead of the current date for reproducable builds (empty string disables this option)") -set(BUILDINFO_OVERRIDE_TIME "" CACHE STRING "Use instead of the current time for reproducable builds (empty string disables this option)") +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)") set(CPACK_OVERRIDE_PACKAGENAME "" CACHE STRING "Use instead of the standard packagename (empty string disables this option)") mark_as_advanced(CPACK_OVERRIDE_PACKAGENAME) mark_as_advanced(BUILDINFO_OVERRIDE_DATE) @@ -891,7 +891,7 @@ if(WITH_X11) endif() if(WITH_X11_XF86VMODE) - # XXX, why dont cmake make this available? + # XXX, why doesn't cmake make this available? find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) mark_as_advanced(X11_Xxf86vmode_LIB) if(X11_Xxf86vmode_LIB) @@ -988,7 +988,7 @@ endif() if(SUPPORT_SSE2_BUILD) set(PLATFORM_CFLAGS " ${PLATFORM_CFLAGS} ${COMPILER_SSE2_FLAG}") add_definitions(-D__SSE2__) - if(NOT SUPPORT_SSE_BUILD) # dont double up + if(NOT SUPPORT_SSE_BUILD) # don't double up add_definitions(-D__MMX__) endif() endif() @@ -1001,7 +1001,7 @@ if(MSVC) # OSX-Note: as we do cross-compiling with specific set architecture, # endianess-detection and auto-setting is counterproductive -# so we just set endianess according CMAKE_OSX_ARCHITECTURES +# so we just set endianness according CMAKE_OSX_ARCHITECTURES elseif(CMAKE_OSX_ARCHITECTURES MATCHES i386 OR CMAKE_OSX_ARCHITECTURES MATCHES x86_64) add_definitions(-D__LITTLE_ENDIAN__) -- cgit v1.2.3 From a1651ddc98ec760e522ea2ea8169b726661fa2e6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 30 Aug 2018 14:20:19 +0200 Subject: Build: require OpenJPEG 2.x minimum, remove bundled version. * WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already the case for macOS and Windows. * This should not break existing Linx builds. If there is no new enough OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG will be disabled. * install_deps.sh was updated with new package names, since distributions put this version in a new package. Differential Revision: https://developer.blender.org/D3663 --- CMakeLists.txt | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c9e650b26a0..91a79af8141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,6 @@ option_defaults_init( _init_FFTW3 _init_GAMEENGINE _init_OPENSUBDIV - _init_SYSTEM_OPENJPG ) # customize... @@ -184,13 +183,11 @@ if(UNIX AND NOT APPLE) set(_init_SDL OFF) set(_init_FFTW3 OFF) set(_init_OPENSUBDIV OFF) - set(_init_SYSTEM_OPENJPG OFF) elseif(WIN32) set(_init_JACK OFF) elseif(APPLE) set(_init_JACK OFF) set(_init_OPENSUBDIV OFF) - set(_init_SYSTEM_OPENJPG OFF) endif() @@ -304,9 +301,6 @@ else() endif() -# (unix defaults to System OpenJPEG On) -option(WITH_SYSTEM_OPENJPEG "Use the operating systems OpenJPEG library" ${_init_SYSTEM_OPENJPG}) - if(UNIX AND NOT APPLE) option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF) endif() @@ -1019,16 +1013,11 @@ else() unset(_SYSTEM_BIG_ENDIAN) endif() if(WITH_IMAGE_OPENJPEG) - if(WITH_SYSTEM_OPENJPEG) - # dealt with above - set(OPENJPEG_DEFINES "") - else() - set(OPENJPEG_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/libopenjpeg") - set(OPENJPEG_DEFINES "-DOPJ_STATIC") - endif() # Special handling of Windows platform where openjpeg is always static. if(WIN32) set(OPENJPEG_DEFINES "-DOPJ_STATIC") + else() + set(OPENJPEG_DEFINES "") endif() endif() @@ -1751,7 +1740,6 @@ if(FIRST_RUN) info_cfg_option(WITH_MEM_JEMALLOC) info_cfg_option(WITH_MEM_VALGRIND) info_cfg_option(WITH_SYSTEM_GLEW) - info_cfg_option(WITH_SYSTEM_OPENJPEG) info_cfg_text("Image Formats:") info_cfg_option(WITH_OPENIMAGEIO) -- cgit v1.2.3 From 34ee9ab97c0cf629987f8f3f72b529ca7e73e027 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 17 Sep 2018 11:10:45 +0200 Subject: CMake: remove PYTHON_NUMPY_INCLUDE_DIRS as a cache variable on macOS/Windows. It's in a fixed location on those platforms, and having it as a cache variable just means things break when we upgrade to a new Python version. --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fa1405994c3..389287c04a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,7 +379,9 @@ if(UNIX AND NOT APPLE) endif() option(WITH_PYTHON_INSTALL "Copy system python into the blender install folder" ON) -if(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) +if(WIN32 OR APPLE) + # Windows and macOS have this bundled with Python libraries. +elseif(WITH_PYTHON_INSTALL OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") mark_as_advanced(PYTHON_NUMPY_PATH) set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") @@ -1477,14 +1479,14 @@ if(WITH_PYTHON) ) endif() - if(WIN32) - # pass, we have this in an archive to extract + if(WIN32 OR APPLE) + # Windows and macOS have this bundled with Python libraries. elseif((WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY) OR (WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)) if(("${PYTHON_NUMPY_PATH}" STREQUAL "") OR (${PYTHON_NUMPY_PATH} MATCHES NOTFOUND)) find_python_package(numpy) unset(PYTHON_NUMPY_INCLUDE_DIRS CACHE) set(PYTHON_NUMPY_INCLUDE_DIRS ${PYTHON_NUMPY_PATH}/numpy/core/include CACHE PATH "Path to the include directory of the numpy module") - mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) + mark_as_advanced(PYTHON_NUMPY_INCLUDE_DIRS) endif() endif() -- cgit v1.2.3 From fcf3aa90daed0dde8c770857990f92c6601f8096 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Tue, 25 Sep 2018 11:05:01 -0600 Subject: CMake: Repress deprecation warnings with MSVC. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 91a79af8141..c51558d6b08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1518,6 +1518,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") "/wd4305" # truncation from 'type1' to 'type2' "/wd4800" # forcing value to bool 'true' or 'false' "/wd4828" # The file contains a character that is illegal + "/wd4996" # identifier was declared deprecated # errors: "/we4013" # 'function' undefined; assuming extern returning int "/we4133" # incompatible pointer types -- cgit v1.2.3 From ee1b2cce5f5c0c3c2980d91d4401a88b49e47090 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 28 Sep 2018 10:06:59 +0200 Subject: CMake: Default to C11 for Clang and GCC The option WITH_C11 is gone, and C++ is defaulting to C++11 now, so guess it's fine to assume we need C11 now. This is technically what we use anyway, with all the re-definitions of structs (like when we typedef anonymous struct in a header file first, and them define it to a proper structure in implementation file). --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f4dd45d5533..4b9e8317e26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1518,12 +1518,8 @@ if( (CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR (CMAKE_C_COMPILER_ID MATCHES "Intel") ) - # Use C99 + GNU extensions, works with GCC, Clang, ICC - if(WITH_C11) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") - endif() + # Use C11 + GNU extensions, works with GCC, Clang, ICC + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") endif() # Include warnings first, so its possible to disable them with user defined flags -- cgit v1.2.3 From 86dbbd156fafccea7bfcf3207c8486fb2098b341 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Mon, 22 Oct 2018 10:17:08 -0600 Subject: Windows: Enable python debugging in Visual Studio. see D3817 for technical details, and https://wiki.blender.org/wiki/Tools/Debugging/Python_Visual_Studio for a end user quick-start guide. Differential Revision: https://developer.blender.org/D3817 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c51558d6b08..fc7f3acbbb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -577,6 +577,9 @@ if(WIN32) option(WINDOWS_USE_VISUAL_STUDIO_FOLDERS "Organize the visual studio project according to source folders." ON) mark_as_advanced(WINDOWS_USE_VISUAL_STUDIO_FOLDERS) + + option(WINDOWS_PYTHON_DEBUG "Include the files needed for debugging python scripts with visual studio 2017+." OFF) + mark_as_advanced(WINDOWS_PYTHON_DEBUG) endif() # avoid using again -- cgit v1.2.3 From 2c5531c0a521119a2f5c88b4ba2a67234c537d2b Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Wed, 7 Nov 2018 12:58:12 +0100 Subject: Cycles: Added Embree as BVH option for CPU renders. Note that this is turned off by default and must be enabled at build time with the CMake WITH_CYCLES_EMBREE flag. Embree must be built as a static library with ray masking turned on, the `make deps` scripts have been updated accordingly. There, Embree is off by default too and must be enabled with the WITH_EMBREE flag. Using Embree allows for much faster rendering of deformation motion blur while reducing the memory footprint. TODO: GPU implementation, deduplication of data, leveraging more of Embrees features (e.g. tessellation cache). Differential Revision: https://developer.blender.org/D3682 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index fc7f3acbbb4..eb8df075380 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -405,6 +405,7 @@ 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) option(WITH_CYCLES_OSL "Build Cycles with OSL support" ${_init_CYCLES_OSL}) +option(WITH_CYCLES_EMBREE "Build Cycles with Embree support" OFF) option(WITH_CYCLES_OPENSUBDIV "Build Cycles with OpenSubdiv support" ${_init_CYCLES_OPENSUBDIV}) option(WITH_CYCLES_CUDA_BINARIES "Build Cycles CUDA binaries" OFF) option(WITH_CYCLES_CUBIN_COMPILER "Build cubins with nvrtc based compiler instead of nvcc" OFF) -- cgit v1.2.3