[Bf-blender-cvs] [bbd5f30ad62] master: Build: change CMake option defaults to match "make full"

Brecht Van Lommel noreply at git.blender.org
Thu Nov 28 19:22:14 CET 2019


Commit: bbd5f30ad62cbd9d308fb6861ca782ac7f2f72bc
Author: Brecht Van Lommel
Date:   Mon Nov 25 17:41:25 2019 +0100
Branches: master
https://developer.blender.org/rBbbd5f30ad62cbd9d308fb6861ca782ac7f2f72bc

Build: change CMake option defaults to match "make full"

Previously some important features like OpenSubdiv were disabled by default,
which caused confusion.

The purpose of disabling some of these features was to avoid potentiall build
errors on Linux. But with precompiled libraries, install_deps.sh and better
library availability checking this is hopefully not much of a problem anymore.

This makes "make full" obsolete, but it's kept to not break docs or shell
scripts that people may have, and the .cmake config file remains useful to
modify an existing build folder.

This also changes some option to only be available on platforms where they
are actually supported (WITH_JACK, WITH_TBB_MALLOC_PROXY and X11 options).

Fixes T69742

Differential Revision: https://developer.blender.org/D6306

===================================================================

M	CMakeLists.txt
M	build_files/cmake/config/blender_full.cmake
M	build_files/cmake/config/blender_lite.cmake
M	build_files/cmake/config/blender_release.cmake

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e6e0abe1ab8..0af6d200c6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -130,76 +130,6 @@ endif()
 get_blender_version()
 
 
-#-----------------------------------------------------------------------------
-# Platform Specific Defaults
-
-# list of var-names
-set(_init_vars)
-
-# initialize to ON
-macro(option_defaults_init)
-  foreach(_var ${ARGV})
-    set(${_var} ON)
-    list(APPEND _init_vars "${_var}")
-  endforeach()
-  unset(_var)
-endmacro()
-
-# remove from namespace
-macro(option_defaults_clear)
-  foreach(_var ${_init_vars})
-    unset(${_var})
-  endforeach()
-  unset(_var)
-  unset(_init_vars)
-endmacro()
-
-
-# values to initialize WITH_****
-option_defaults_init(
-  _init_BUILDINFO
-  _init_CODEC_FFMPEG
-  _init_CYCLES_OSL
-  _init_IMAGE_OPENEXR
-  _init_INPUT_NDOF
-  _init_JACK
-  _init_OPENCOLLADA
-  _init_OPENCOLORIO
-  _init_SDL
-  _init_FFTW3
-  _init_OPENSUBDIV
-)
-
-# TBB malloc is only supported on for windows currently
-if(WIN32)
-  set(_init_TBB_MALLOC_PROXY ON)
-else()
-  set(_init_TBB_MALLOC_PROXY OFF)
-endif()
-
-
-# customize...
-if(UNIX AND NOT APPLE)
-  # some of these libraries are problematic on Linux
-  # disable less important dependencies by default
-  set(_init_CODEC_FFMPEG                   OFF)
-  set(_init_CYCLES_OSL                     OFF)
-  set(_init_IMAGE_OPENEXR                  OFF)
-  set(_init_JACK                           OFF)
-  set(_init_OPENCOLLADA                    OFF)
-  set(_init_OPENCOLORIO                    OFF)
-  set(_init_SDL                            OFF)
-  set(_init_FFTW3                          OFF)
-  set(_init_OPENSUBDIV                     OFF)
-  set(_init_OPENVDB                        OFF)
-  set(_init_OPENIMAGEDENOISE               OFF)
-elseif(WIN32)
-  set(_init_JACK                           OFF)
-elseif(APPLE)
-  set(_init_JACK                           OFF)
-endif()
-
-
 #-----------------------------------------------------------------------------
 # Options
 
@@ -226,7 +156,7 @@ if(APPLE)
   option(WITH_PYTHON_FRAMEWORK "Enable building using the Python available in the framework (OSX only)" OFF)
 endif()
 
-option(WITH_BUILDINFO     "Include extra build details (only disable for development & faster builds)" ${_init_BUILDINFO})
+option(WITH_BUILDINFO     "Include extra build details (only disable for development & faster builds)" ON)
 if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
   # add_library OBJECT arg unsupported
   set(WITH_BUILDINFO OFF)
@@ -240,20 +170,20 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
 
 option(WITH_IK_ITASC      "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
 option(WITH_IK_SOLVER     "Enable Legacy IK solver (only disable for development)" ON)
-option(WITH_FFTW3         "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ${_init_FFTW3})
+option(WITH_FFTW3         "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
 option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
 mark_as_advanced(WITH_SYSTEM_BULLET)
-option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
+option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ON)
 
 # Compositor
 option(WITH_COMPOSITOR         "Enable the tile based nodal compositor" ON)
-option(WITH_OPENIMAGEDENOISE   "Enable the OpenImageDenoise compositing node" ${_init_OPENIMAGEDENOISE})
+option(WITH_OPENIMAGEDENOISE   "Enable the OpenImageDenoise compositing node" ON)
 
-option(WITH_OPENSUBDIV    "Enable OpenSubdiv for surface subdivision" ${_init_OPENSUBDIV})
+option(WITH_OPENSUBDIV    "Enable OpenSubdiv for surface subdivision" ON)
 
-option(WITH_OPENVDB       "Enable features relying on OpenVDB" ${_init_OPENVDB})
-option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ${_init_OPENVDB})
+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)
 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)
 
@@ -315,11 +245,11 @@ endif()
 option(WITH_MOD_FLUID           "Enable Elbeem Modifier (Fluid Simulation)" ON)
 option(WITH_MOD_SMOKE           "Enable Smoke Modifier (Smoke Simulation)" ON)
 option(WITH_MOD_REMESH          "Enable Remesh Modifier" ON)
-option(WITH_MOD_OCEANSIM        "Enable Ocean Modifier" OFF)
+option(WITH_MOD_OCEANSIM        "Enable Ocean Modifier" ON)
 
 # Image format support
 option(WITH_OPENIMAGEIO         "Enable OpenImageIO Support (http://www.openimageio.org)" ON)
-option(WITH_IMAGE_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ${_init_IMAGE_OPENEXR})
+option(WITH_IMAGE_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
 option(WITH_IMAGE_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org)" ON)
 option(WITH_IMAGE_TIFF          "Enable LibTIFF Support" ON)
 option(WITH_IMAGE_DDS           "Enable DDS Image Support" ON)
@@ -328,23 +258,25 @@ option(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
 
 # Audio/Video format support
 option(WITH_CODEC_AVI           "Enable Blenders own AVI file support (raw/jpeg)" ON)
-option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.org)" ${_init_CODEC_FFMPEG})
-option(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
+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)
 
 # Alembic support
-option(WITH_ALEMBIC             "Enable Alembic Support" OFF)
+option(WITH_ALEMBIC             "Enable Alembic Support" ON)
 option(WITH_ALEMBIC_HDF5        "Enable Legacy Alembic Support (not officially supported)" OFF)
 
 # 3D format support
 # Disable opencollada when we don't have precompiled libs
-option(WITH_OPENCOLLADA   "Enable OpenCollada Support (http://www.opencollada.org)" ${_init_OPENCOLLADA})
+option(WITH_OPENCOLLADA   "Enable OpenCollada Support (http://www.opencollada.org)" ON)
 
 # Sound output
-option(WITH_SDL           "Enable SDL for sound and joystick support" ${_init_SDL})
+option(WITH_SDL           "Enable SDL for sound and joystick support" ON)
 option(WITH_OPENAL        "Enable OpenAL Support (http://www.openal.org)" ON)
-option(WITH_JACK          "Enable JACK Support (http://www.jackaudio.org)" ${_init_JACK})
-if(UNIX AND NOT APPLE)
-  option(WITH_JACK_DYNLOAD  "Enable runtime dynamic JACK libraries loading" OFF)
+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()
 endif()
 if(UNIX AND NOT APPLE)
   option(WITH_SDL_DYNLOAD  "Enable runtime dynamic SDL libraries loading" OFF)
@@ -360,7 +292,7 @@ option(WITH_DRACO         "Enable Draco mesh compression Python module (used for
 
 # Camera/motion tracking
 option(WITH_LIBMV         "Enable Libmv structure from motion library" ON)
-option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." OFF)
+option(WITH_LIBMV_SCHUR_SPECIALIZATIONS "Enable fixed-size schur specializations." ON)
 mark_as_advanced(WITH_LIBMV_SCHUR_SPECIALIZATIONS)
 
 # Logging/unbit test libraries.
@@ -376,7 +308,7 @@ option(WITH_FREESTYLE     "Enable Freestyle (advanced edges rendering)" ON)
 if(WIN32)
   option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
 endif()
-option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ${_init_INPUT_NDOF})
+option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
 if(UNIX AND NOT APPLE)
   option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
   option(WITH_STATIC_LIBS "Try to link with static libraries, as much as possible, to make blender more portable across distributions" OFF)
@@ -412,7 +344,7 @@ mark_as_advanced(WITH_CPU_SSE)
 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_OSL              "Build Cycles with OSL support" ON)
 option(WITH_CYCLES_EMBREE           "Build Cycles with Embree support" OFF)
 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)
@@ -468,7 +400,11 @@ mark_as_advanced(WITH_ASSERT_ABORT)
 
 option(WITH_BOOST "Enable features depending on boost" ON)
 option(WITH_TBB   "Enable features depending on TBB (OpenVDB, OpenImageDenoise, sculpt multithreading)" ON)
-option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ${_init_TBB_MALLOC_PROXY})
+
+# TBB malloc is only supported on for windows currently
+if(WIN32)
+  option(WITH_TBB_MALLOC_PROXY "Enable the TBB malloc replacement" ON)
+endif()
 
 # Unit testsing
 option(WITH_GTESTS "Enable GTest unit testing" OFF)
@@ -591,9 +527,6 @@ endif()
 option(POSTINSTALL_SCRIPT "Run given CMake script after installation process" OFF)
 mark_as_advanced(POSTINSTALL_SCRIPT)
 
-# avoid using again
-option_defaults_clear()
-
 # end option(...)
 
 
diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake
index 56b970c349d..2511ee02e39 100644
--- a/build_files/cmake/config/blender_full.cmake
+++ b/build_files/cmake/config/blender_full.cmake
@@ -18,7 +18,6 @@ set(WITH_LIBMV               ON  CACHE BOOL "" FORCE)
 set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
 set(WITH_COMPOSITOR        

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list