diff --git a/CMakeLists.txt b/CMakeLists.txt index ad5b1d12eea..35ee85a9462 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,7 +290,8 @@ Use pre-compiled headers to speed up compilation." if(WITH_CLANG_TIDY AND (CMAKE_COMPILER_IS_GNUCC OR APPLE)) if(WITH_COMPILER_PRECOMPILED_HEADERS) message(STATUS - "Clang-Tidy and the current compiler's precompiled headers are incompatible, disabling precompiled headers." + "Clang-Tidy and the current compiler's precompiled headers are incompatible, " + "disabling precompiled headers." ) set(WITH_COMPILER_PRECOMPILED_HEADERS OFF) endif() @@ -644,7 +645,8 @@ Build Cycles kernels with address sanitizer when WITH_COMPILER_ASAN is on, even OFF ) set(CYCLES_TEST_DEVICES CPU CACHE STRING "\ -Run regression tests on the specified device types (CPU CUDA OPTIX HIP HIP-RT METAL METAL-RT ONEAPI ONEAPI-RT)" +Run regression tests on the specified device types \ +(CPU CUDA OPTIX HIP HIP-RT METAL METAL-RT ONEAPI ONEAPI-RT)" ) option(WITH_CYCLES_TEST_OSL "\ Run additional Cycles test with OSL enabled" @@ -697,7 +699,8 @@ endif() if(NOT APPLE AND NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")) option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON) option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF) - # We only support RDNA1 (gfx101X) and newer. Vega and older generations have rendering artifacts and crashing issues. + # We only support RDNA1 (gfx101X) and newer. + # Vega and older generations have rendering artifacts and crashing issues. set(CYCLES_HIP_BINARIES_ARCH gfx1010 gfx1011 gfx1012 gfx1030 gfx1031 gfx1032 gfx1034 gfx1035 gfx1036 @@ -830,7 +833,10 @@ Enable GPU drawing related unit testing (draw manager)" OFF ) option(WITH_GPU_COMPOSITOR_TESTS "Enable regression testing for GPU compositor" OFF) -option(WITH_GPU_MESH_PAINT_TESTS "Enable visual render-based regression testing for mesh painting" OFF) +option(WITH_GPU_MESH_PAINT_TESTS "\ +Enable visual render-based regression testing for mesh painting" + OFF +) option(WITH_UI_TESTS "\ Enable user-interface tests (Experimental)" OFF @@ -892,10 +898,10 @@ Enable tests validating some build-related scripts against the 'system' version ) mark_as_advanced(WITH_SYSTEM_PYTHON_TESTS) # We could use `find_package (Python3 COMPONENTS Interpreter)` to set that value automatically. -# However, on some buildbots this will give the default python version of the current virtual environment, -# which may differ from the OS default python version. -# And it would set that global 'python3 exec path' CMake value for all CMake scripts, which could have -# unexpected and dangerous side effects. +# However, on some buildbots this will give the default Python version of the current virtual +# environment, which may differ from the OS default Python version. +# And it would set that global 'python3 exec path' CMake value for all CMake scripts, +# which could have unexpected and dangerous side effects. # So this has to be set explicitly for all builders. set(TEST_SYSTEM_PYTHON_EXE "" CACHE PATH "Python executable used to run 'system python' tests") mark_as_advanced(TEST_SYSTEM_PYTHON_EXE) @@ -1026,9 +1032,15 @@ endif() if(WITH_COMPILER_CODE_COVERAGE) set(_code_coverage_defaults "--coverage") - set(COMPILER_CODE_COVERAGE_CFLAGS ${_code_coverage_defaults} CACHE STRING "C flags for code coverage") + set(COMPILER_CODE_COVERAGE_CFLAGS + ${_code_coverage_defaults} CACHE STRING + "C flags for code coverage" + ) mark_as_advanced(COMPILER_CODE_COVERAGE_CFLAGS) - set(COMPILER_CODE_COVERAGE_CXXFLAGS ${_code_coverage_defaults} CACHE STRING "C++ flags for code coverage") + set(COMPILER_CODE_COVERAGE_ + CXXFLAGS ${_code_coverage_defaults} CACHE STRING + "C++ flags for code coverage" + ) mark_as_advanced(COMPILER_CODE_COVERAGE_CXXFLAGS) unset(_code_coverage_defaults) endif() diff --git a/build_files/build_environment/cmake/download.cmake b/build_files/build_environment/cmake/download.cmake index a53c651bbc3..58b6e737f9c 100644 --- a/build_files/build_environment/cmake/download.cmake +++ b/build_files/build_environment/cmake/download.cmake @@ -68,7 +68,10 @@ function(download_source dep) if(NOT PACKAGE_USE_UPSTREAM_SOURCES OR FORCE_CHECK_HASH) file(${TARGET_HASH_TYPE} ${TARGET_FILE} LOCAL_HASH) if(NOT ${TARGET_HASH} STREQUAL ${LOCAL_HASH}) - message(FATAL_ERROR "${TARGET_FILE} ${TARGET_HASH_TYPE} mismatch\nExpected\t: ${TARGET_HASH}\nActual\t: ${LOCAL_HASH}") + message(FATAL_ERROR + "${TARGET_FILE} ${TARGET_HASH_TYPE} mismatch\n" + "Expected\t: ${TARGET_HASH}\nActual\t: ${LOCAL_HASH}" + ) endif() endif() endif() diff --git a/build_files/build_environment/cmake/embree_windows_arm.cmake b/build_files/build_environment/cmake/embree_windows_arm.cmake index 38ef7aed78f..417c31dd43e 100644 --- a/build_files/build_environment/cmake/embree_windows_arm.cmake +++ b/build_files/build_environment/cmake/embree_windows_arm.cmake @@ -56,7 +56,10 @@ file(GLOB EMBREE_INSTALLED_VCTOOLS RELATIVE ${EMBREE_VCTOOLSDIR_PATH} ${EMBREE_V # Check that at least one the installed tool versions # (there may be different subversions) is present. if(NOT EMBREE_INSTALLED_VCTOOLS) - message(FATAL_ERROR "When building for Windows ARM64 platforms, embree requires VC Tools ${EMBREE_VCTOOLS_REQUIRED_VERSION} to be installed alongside the current version.") + message(FATAL_ERROR + "When building for Windows ARM64 platforms, embree requires VC Tools " + "${EMBREE_VCTOOLS_REQUIRED_VERSION} to be installed alongside the current version." + ) endif() # Get the last item in the list (latest, when list is sorted) diff --git a/build_files/build_environment/cmake/openpgl_windows_arm.cmake b/build_files/build_environment/cmake/openpgl_windows_arm.cmake index eb9367aa1c2..9d8a2a750d6 100644 --- a/build_files/build_environment/cmake/openpgl_windows_arm.cmake +++ b/build_files/build_environment/cmake/openpgl_windows_arm.cmake @@ -41,7 +41,10 @@ file(GLOB OPENPGL_INSTALLED_VCTOOLS RELATIVE ${OPENPGL_VCTOOLSDIR_PATH} ${OPENPG # Check that at least one the installed tool versions # (there may be different subversions) is present. if(NOT OPENPGL_INSTALLED_VCTOOLS) - message(FATAL_ERROR "When building for Windows ARM64 platforms, OpenPGL requires VC Tools ${OPENPGL_VCTOOLS_REQUIRED_VERSION} to be installed alongside the current version.") + message(FATAL_ERROR + "When building for Windows ARM64 platforms, " + "OpenPGL requires VC Tools ${OPENPGL_VCTOOLS_REQUIRED_VERSION} " + "to be installed alongside the current version.") endif() # Get the last item in the list (latest, when list is sorted) diff --git a/build_files/build_environment/cmake/setup_msys2.cmake b/build_files/build_environment/cmake/setup_msys2.cmake index d10531c8d88..c3552051311 100644 --- a/build_files/build_environment/cmake/setup_msys2.cmake +++ b/build_files/build_environment/cmake/setup_msys2.cmake @@ -11,10 +11,11 @@ ################################################################################################## macro(download_package package_name) - # this will - # 1 - download the required package from either the upstream location or blender mirror depending on MSYS2_USE_UPSTREAM_PACKAGES - # 2 - Set a global variable [package_name]_FILE to point to the downloaded file - # 3 - Verify the hash if FORCE_CHECK_HASH is on + # This will: + # 1 - Download the required package from either the upstream location or blender mirror + # depending on `MSYS2_USE_UPSTREAM_PACKAGES`. + # 2 - Set a global variable [package_name]_FILE to point to the downloaded file. + # 3 - Verify the hash if FORCE_CHECK_HASH is on. set(URL ${MSYS2_${package_name}_URL}) set(HASH ${MSYS2_${package_name}_HASH}) string(REPLACE "/" ";" _url_list ${URL}) @@ -52,8 +53,9 @@ macro(download_package package_name) unset(_file_name) endmacro() -# Note we use URL here rather than URI as the deps checker will check all *_URI vars for package/license/homepage requirements -# since none of this will end up on end users systems the requirements are not as strict +# Note we use URL here rather than URI as the dependencies checker will check all `*_URI` +# variables for package/license/homepage requirements since none of this will end up +# on end users systems the requirements are not as strict. set(MSYS2_BASE_URL https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20221028.tar.xz) set(MSYS2_BASE_HASH 545cc6a4c36bb98058f2b2945c5d06de523516db) @@ -113,7 +115,8 @@ if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd") AND # Do initial upgrade of pacman packages (only required for initial setup, to get # latest packages as opposed to to what the installer comes with) execute_process( - COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Sy --noconfirm && exit" + COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c + "pacman -Sy --noconfirm && exit" WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64 ) endif() @@ -123,13 +126,15 @@ if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe") # Refresh pacman repositories (similar to debian's `apt update`) message("Refreshing pacman") execute_process( - COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Syy --noconfirm && exit" + COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c + "pacman -Syy --noconfirm && exit" WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64 ) message("Installing required packages") execute_process( - COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -S patch m4 coreutils pkgconf make diffutils autoconf-wrapper --noconfirm && exit" + COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c + "pacman -S patch m4 coreutils pkgconf make diffutils autoconf-wrapper --noconfirm && exit" WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64 ) endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 12ac9b899e4..7589cd7c95e 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -21,7 +21,11 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang") if(DEFINED MSVC_REDIST_DIR) file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR) else() - message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.") + message( + "Unable to detect the Visual Studio redist directory, " + "copying of the runtime dlls will not work, " + "try running from the visual studio developer prompt." + ) endif() if(WITH_WINDOWS_STRIPPED_PDB) message(WARNING "stripped pdb not supported with clang, disabling..") @@ -30,28 +34,41 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang") else() if(WITH_BLENDER) if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28.29921) # MSVC 2019 16.9.16 - message(FATAL_ERROR "Compiler is unsupported, MSVC 2019 16.9.16 or newer is required for building blender.") + message(FATAL_ERROR + "Compiler is unsupported, MSVC 2019 16.9.16 or newer is required for building blender." + ) endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.36.32532 AND # MSVC 2022 17.6.0 has a bad codegen CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.37.32705) # But it is fixed in 2022 17.7 preview 1 - message(FATAL_ERROR "Compiler is unsupported, MSVC 2022 17.6.x has codegen issues and cannot be used to build blender. Please upgrade to 17.7 or newer.") + message(FATAL_ERROR + "Compiler is unsupported, " + "MSVC 2022 17.6.x has codegen issues and cannot be used to build blender. " + "Please upgrade to 17.7 or newer." + ) endif() endif() endif() set(WINDOWS_ARM64_MIN_VSCMD_VER 17.12.3) # We have a minimum version of VSCMD for ARM64 (ie, the version the libs were compiled against) -# This checks for the version on initial run, and caches it, so users do not have to run the VS CMD window every time +# This checks for the version on initial run, and caches it, +# so users do not have to run the VS CMD window every time if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") set(VC_VSCMD_VER $ENV{VSCMD_VER} CACHE STRING "Version of the VSCMD initially run from") mark_as_advanced(VC_VSCMD_VER) set(VSCMD_VER ${VC_VSCMD_VER}) if(DEFINED VSCMD_VER) if(VSCMD_VER VERSION_LESS WINDOWS_ARM64_MIN_VSCMD_VER) - message(FATAL_ERROR "Windows ARM64 requires VS2022 version ${WINDOWS_ARM64_MIN_VSCMD_VER} or greater - please update your VS2022 install!") + message(FATAL_ERROR + "Windows ARM64 requires VS2022 version ${WINDOWS_ARM64_MIN_VSCMD_VER} or greater - " + "please update your VS2022 install!" + ) endif() else() - message(FATAL_ERROR "Unable to detect the Visual Studio CMD version, try running from the visual studio developer prompt.") + message(FATAL_ERROR + "Unable to detect the Visual Studio CMD version, " + "try running from the visual studio developer prompt." + ) endif() endif() @@ -279,7 +296,8 @@ string(APPEND PLATFORM_LINKFLAGS " /SUBSYSTEM:CONSOLE /STACK:2097152") set(PLATFORM_LINKFLAGS_RELEASE "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib") if(NOT WITH_COMPILER_ASAN) - # Asan is incompatible with fastlink, it will appear to work, but will not resolve symbols which makes it somewhat useless + # ASAN is incompatible with `fastlink`, it will appear to work, + # but will not resolve symbols which makes it somewhat useless. string(APPEND PLATFORM_LINKFLAGS_DEBUG "/debug:fastlink ") endif() string(APPEND PLATFORM_LINKFLAGS_DEBUG " /IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcmtd.lib") @@ -308,10 +326,16 @@ if(NOT DEFINED LIBDIR) set(LIBDIR_BASE "windows_x64") endif() else() - message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder") + message(FATAL_ERROR + "32 bit compiler detected, " + "blender no longer provides pre-build libraries for 32 bit windows, " + "please set the LIBDIR cmake variable to your own library folder" + ) endif() if(MSVC_CLANG) - message(STATUS "Clang version ${CMAKE_CXX_COMPILER_VERSION} detected, masquerading as MSVC ${MSVC_VERSION}") + message(STATUS + "Clang version ${CMAKE_CXX_COMPILER_VERSION} detected, masquerading as MSVC ${MSVC_VERSION}" + ) set(LIBDIR ${CMAKE_SOURCE_DIR}/lib/${LIBDIR_BASE}) elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.30.30423) message(STATUS "Visual Studio 2022 detected.") @@ -326,7 +350,10 @@ else() endif() endif() if(NOT EXISTS "${LIBDIR}/.git") - message(FATAL_ERROR "\n\nWindows requires pre-compiled libs at: '${LIBDIR}'. Please run `make update` in the blender source folder to obtain them.") + message(FATAL_ERROR + "\n\nWindows requires pre-compiled libs at: '${LIBDIR}'. " + "Please run `make update` in the blender source folder to obtain them." + ) endif() include(platform_old_libs_update) @@ -611,7 +638,9 @@ if(FALSE) set(_PYTHON_VERSION "3.12") string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${_PYTHON_VERSION}) if(NOT EXISTS ${LIBDIR}/python/${_PYTHON_VERSION_NO_DOTS}) - message(FATAL_ERROR "Missing python libraries! Neither 3.12 nor 3.11 are found in ${LIBDIR}/python") + message(FATAL_ERROR + "Missing python libraries! Neither 3.12 nor 3.11 are found in ${LIBDIR}/python" + ) endif() endif() endif() @@ -751,7 +780,9 @@ if(WITH_LLVM) set(LLVM_LIBRARY ${LLVM_LIBS}) else() - message(WARNING "LLVM debug libs not present on this system. Using release libs for debug builds.") + message(WARNING + "LLVM debug libs not present on this system. Using release libs for debug builds." + ) set(LLVM_LIBRARY ${LLVM_LIBRARY_OPTIMIZED}) endif() @@ -1152,7 +1183,9 @@ if(WINDOWS_PYTHON_DEBUG) # If the user scripts env var is set, include scripts from there otherwise # include user scripts in the profile folder. if(DEFINED ENV{BLENDER_USER_SCRIPTS}) - message(STATUS "Including user scripts from environment BLENDER_USER_SCRIPTS=$ENV{BLENDER_USER_SCRIPTS}") + message(STATUS + "Including user scripts from environment BLENDER_USER_SCRIPTS=$ENV{BLENDER_USER_SCRIPTS}" + ) set(USER_SCRIPTS_ROOT "$ENV{BLENDER_USER_SCRIPTS}") else() message(STATUS "Including user scripts from the profile folder") diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index e40e1f5756d..c55aa48c081 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -13,7 +13,9 @@ else() if(NOT WINDOWS_PYTHON_DEBUG) set(CYCLES_INSTALL_PATH "scripts/addons_core/cycles") else() - set(CYCLES_INSTALL_PATH "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}/scripts/addons_core/cycles") + set(CYCLES_INSTALL_PATH + "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}/scripts/addons_core/cycles" + ) endif() endif() @@ -299,7 +301,10 @@ if(WITH_CYCLES_EMBREE) add_compile_definitions("$<$:WITH_EMBREE_GPU>") add_compile_definitions("$<$:WITH_EMBREE_GPU>") if(CMAKE_BUILD_TYPE MATCHES "Debug" OR GENERATOR_IS_MULTI_CONFIG) - message(STATUS "The use of Embree GPU is disabled for the Debug configuration as embree${EMBREE_MAJOR_VERSION}_sycl_d.lib is not found.") + message(STATUS + "The use of Embree GPU is disabled for the Debug configuration " + "as embree${EMBREE_MAJOR_VERSION}_sycl_d.lib is not found." + ) endif() else() add_definitions(-DWITH_EMBREE_GPU) diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index 516c31f8adf..409d8acfc77 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -1015,7 +1015,10 @@ if(WITH_CYCLES_DEVICE_ONEAPI) endif() if(NOT oclocids_ret EQUAL 0) list(REMOVE_ITEM CYCLES_ONEAPI_INTEL_BINARIES_ARCH ${device}) - message(STATUS "Cycles oneAPI: binaries for ${device} not supported by Intel Graphics Compiler/ocloc, skipped.") + message(STATUS + "Cycles oneAPI: " + "binaries for ${device} not supported by Intel Graphics Compiler/ocloc, skipped." + ) endif() endforeach() list(JOIN CYCLES_ONEAPI_INTEL_BINARIES_ARCH "," gen_devices_string) diff --git a/source/blender/blendthumb/CMakeLists.txt b/source/blender/blendthumb/CMakeLists.txt index 8888f9bb79f..8007207113d 100644 --- a/source/blender/blendthumb/CMakeLists.txt +++ b/source/blender/blendthumb/CMakeLists.txt @@ -76,8 +76,9 @@ elseif(APPLE) # Command taken from XCode build process. add_custom_command( TARGET blender-thumbnailer POST_BUILD - COMMAND codesign --deep --force --sign - --entitlements "${CMAKE_SOURCE_DIR}/release/darwin/thumbnailer_entitlements.plist" - --timestamp=none $ + COMMAND codesign --deep --force --sign - + --entitlements "${CMAKE_SOURCE_DIR}/release/darwin/thumbnailer_entitlements.plist" + --timestamp=none $ ) elseif(UNIX) # ----------------------------------------------------------------------------- diff --git a/source/blender/io/CMakeLists.txt b/source/blender/io/CMakeLists.txt index 66befbda236..5b8bb175e34 100644 --- a/source/blender/io/CMakeLists.txt +++ b/source/blender/io/CMakeLists.txt @@ -2,7 +2,13 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -if(WITH_IO_WAVEFRONT_OBJ OR WITH_IO_PLY OR WITH_IO_STL OR WITH_IO_GREASE_PENCIL OR WITH_ALEMBIC OR WITH_USD OR WITH_IO_CSV) +if(WITH_IO_WAVEFRONT_OBJ OR + WITH_IO_PLY OR + WITH_IO_STL OR + WITH_IO_GREASE_PENCIL OR + WITH_ALEMBIC OR + WITH_USD OR + WITH_IO_CSV) add_subdirectory(common) endif() diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 210e46d50be..39206a57b11 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -23,7 +23,10 @@ file(MAKE_DIRECTORY ${TEST_OUT_DIR}/blendfile_io) if(WITH_SYSTEM_PYTHON_TESTS) if(NOT EXISTS "${TEST_SYSTEM_PYTHON_EXE}") - message(ERROR "'System Python' tests requested but no valid system python path, set TEST_SYSTEM_PYTHON_EXE.") + message(ERROR + "'System Python' tests requested but no valid system python path, " + "set TEST_SYSTEM_PYTHON_EXE." + ) set(WITH_SYSTEM_PYTHON_TESTS OFF) endif() endif() @@ -677,7 +680,8 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS) if(WITH_CYCLES_TEST_OSL AND WITH_CYCLES_OSL) # OSL is only supported with CPU and OptiX # TODO: Enable OptiX support once it's more stable - if(("${_cycles_device_lower}" STREQUAL "cpu") OR ("${_cycles_device_lower}" STREQUAL "optix")) + if(("${_cycles_device_lower}" STREQUAL "cpu") OR + ("${_cycles_device_lower}" STREQUAL "optix")) add_render_test( ${_cycles_test_name}_osl ${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py @@ -1016,7 +1020,10 @@ foreach(geo_node_test ${geo_node_tests}) ) endforeach() else() - message(STATUS "Directory named ${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/ Not Found, disabling test.") + message(STATUS + "Directory named ${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/ " + "Not Found, disabling test." + ) endif() endforeach() @@ -1032,7 +1039,10 @@ if(EXISTS "${TEST_SRC_DIR}/modeling/geometry_nodes/simulation/") ) endforeach() else() - message(STATUS "Directory named ${TEST_SRC_DIR}/modeling/geometry_nodes/simulation/ not found, disabling tests") + message(STATUS + "Directory named ${TEST_SRC_DIR}/modeling/geometry_nodes/simulation/ " + "Not found, disabling tests." + ) endif() if(WITH_GPU_RENDER_TESTS) diff --git a/tests/python/collada/CMakeLists.txt b/tests/python/collada/CMakeLists.txt index c84d59e9e60..595ff5f8e48 100644 --- a/tests/python/collada/CMakeLists.txt +++ b/tests/python/collada/CMakeLists.txt @@ -23,12 +23,29 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR}) # all calls to blender use this if(APPLE) if(${CMAKE_GENERATOR} MATCHES "Xcode") - set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error) + set(TEST_BLENDER_EXE_PARAMS + --background + --factory-startup + --debug-memory + --debug-exit-on-error + ) else() - set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts) + set(TEST_BLENDER_EXE_PARAMS + --background + --factory-startup + --debug-memory + --debug-exit-on-error + --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts + ) endif() else() - set(TEST_BLENDER_EXE_PARAMS --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts) + set(TEST_BLENDER_EXE_PARAMS + --background + --factory-startup + --debug-memory + --debug-exit-on-error + --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts + ) endif() # for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no @@ -40,9 +57,11 @@ endif() macro(COLLADA_TEST module test_name blend_file) add_test( NAME bf_io_collada_${module}_${test_name} - COMMAND "$" ${TEST_BLENDER_EXE_PARAMS} ${TEST_SRC_DIR}/collada/${module}/${blend_file} - --python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py -- - --testdir ${TEST_SRC_DIR}/collada/${module} + COMMAND "$" + ${TEST_BLENDER_EXE_PARAMS} + ${TEST_SRC_DIR}/collada/${module}/${blend_file} + --python ${CMAKE_CURRENT_LIST_DIR}/${module}/test_${module}_${test_name}.py -- + --testdir ${TEST_SRC_DIR}/collada/${module} ) endmacro() diff --git a/tests/python/view_layer/CMakeLists.txt b/tests/python/view_layer/CMakeLists.txt index 4d5a25890f0..3cf25827fe5 100644 --- a/tests/python/view_layer/CMakeLists.txt +++ b/tests/python/view_layer/CMakeLists.txt @@ -16,9 +16,15 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_OUT_DIR}) # message(FATAL_ERROR "CMake test directory not found!") # endif() -# for testing with valgrind prefix: valgrind --track-origins=yes --error-limit=no -set(TEST_BLENDER_EXE $ --background --factory-startup --debug-memory --debug-exit-on-error --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts) - +# For testing with VALGRIND prefix: `valgrind --track-origins=yes --error-limit=no` +set(TEST_BLENDER_EXE + $ + --background + --factory-startup + --debug-memory + --debug-exit-on-error + --env-system-scripts ${CMAKE_SOURCE_DIR}/scripts +) # ------------------------------------------------------------------------------