Skip to content
Snippets Groups Projects
Commit 2d60a546 authored by Brecht Van Lommel's avatar Brecht Van Lommel
Browse files

Build: add config for developers

This has faster builds, error checks and tests. The number of cmake options
for this type of thing has grown over the years and it's convenient to be
able to point new developers to a single target.

Previously the combination of all these options did not work correctly, now
all tests should pass.

The easiest way to use this is with the make wrapper, for example:
make full developer debug

Or set it manually with CMake:
cmake -C ../blender/build_files/cmake/config/blender_developer.cmake .

Differential Revision: https://developer.blender.org/D5149
parent 47bf754d
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ Convenience Targets ...@@ -37,6 +37,7 @@ Convenience Targets
* bpy: Build as a python module which can be loaded from python directly. * bpy: Build as a python module which can be loaded from python directly.
* deps: Build library dependencies (intended only for platform maintainers). * deps: Build library dependencies (intended only for platform maintainers).
* developer: Enable faster builds, error checking and tests, recommended for developers.
* config: Run cmake configuration tool to set build options. * config: Run cmake configuration tool to set build options.
Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir. Note: passing the argument 'BUILD_DIR=path' when calling make will override the default build dir.
...@@ -221,6 +222,10 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" "" ...@@ -221,6 +222,10 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake" BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
endif endif
ifneq "$(findstring developer, $(MAKECMDGOALS))" ""
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_developer.cmake"
endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Blender binary path # Blender binary path
...@@ -294,6 +299,7 @@ lite: all ...@@ -294,6 +299,7 @@ lite: all
cycles: all cycles: all
headless: all headless: all
bpy: all bpy: all
developer: all
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Build dependencies # Build dependencies
......
# Configuration for developers, with faster builds, error checking and tests.
#
# Example usage:
# cmake -C../blender/build_files/cmake/config/blender_developer.cmake ../blender
#
set(WITH_ASSERT_ABORT ON CACHE BOOL "" FORCE)
set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
set(WITH_COMPILER_ASAN ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_DEBUG ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_NATIVE_ONLY ON CACHE BOOL "" FORCE)
set(WITH_GTESTS ON CACHE BOOL "" FORCE)
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS OFF CACHE BOOL "" FORCE)
set(WITH_PYTHON_SAFETY ON CACHE BOOL "" FORCE)
set(WITH_DOC_MANPAGE OFF CACHE BOOL "" FORCE)
# This may have issues with C++ initialization order, needs to be tested
# on all platforms to be sure this is safe to enable.
# set(WITH_CXX_GUARDEDALLOC ON CACHE BOOL "" FORCE)
...@@ -41,6 +41,8 @@ if NOT "%1" == "" ( ...@@ -41,6 +41,8 @@ if NOT "%1" == "" (
) else if "%1" == "release" ( ) else if "%1" == "release" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake" set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_release.cmake"
set TARGET=Release set TARGET=Release
) else if "%1" == "developer" (
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -C"%BLENDER_DIR%\build_files\cmake\config\blender_developer.cmake"
) else if "%1" == "asan" ( ) else if "%1" == "asan" (
set WITH_ASAN=1 set WITH_ASAN=1
) else if "%1" == "x86" ( ) else if "%1" == "x86" (
......
...@@ -17,6 +17,7 @@ echo - format [path] ^(Format the source using clang-format, path is optional, r ...@@ -17,6 +17,7 @@ echo - format [path] ^(Format the source using clang-format, path is optional, r
echo. echo.
echo Configuration options echo Configuration options
echo - verbose ^(enable diagnostic output during configuration^) echo - verbose ^(enable diagnostic output during configuration^)
echo - developer ^(enable faster builds, error checking and tests, recommended for developers^)
echo - with_tests ^(enable building unit tests^) echo - with_tests ^(enable building unit tests^)
echo - nobuildinfo ^(disable buildinfo^) echo - nobuildinfo ^(disable buildinfo^)
echo - debug ^(Build an unoptimized debuggable build^) echo - debug ^(Build an unoptimized debuggable build^)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment