diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index ec3334797e2..926a04852d0 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -5,12 +5,12 @@ ################################################################################################## # # This is a build system used by platform maintainers to build library dependencies. -# For users building Blender, we recommend using the precompiled libraries from lib/ +# For users building Blender, we recommend using the pre-compiled libraries from `lib/` # on all platforms. # # This CMake project is usually built through wrappers: -# * Windows: build_files/build_environment/windows/build_deps.cmd -# * macOS and Linux: "make deps" from the blender directory +# * Windows: `build_files/build_environment/windows/build_deps.cmd`. +# * macOS and Linux: `make deps` from the blender directory. # ################################################################################################## @@ -108,9 +108,9 @@ if(BLENDER_PLATFORM_WINDOWS_ARM) else() include(cmake/openpgl.cmake) endif() -# Embree needs to be included after dpcpp as it uses it for compiling with GPU support +# EMBREE needs to be included after `dpcpp` as it uses it for compiling with GPU support if(BLENDER_PLATFORM_WINDOWS_ARM) - # WoA needs embree to be built with the VS Generator + LLVM, + # WoA needs EMBREE to be built with the VS Generator + LLVM, # put it in its own file to avoid clutter. include(cmake/embree_windows_arm.cmake) else() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index f8b56ce68a4..dad5880a7ae 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -88,8 +88,8 @@ add_definitions(-DWIN32) add_compile_options("$<$:/utf-8>") add_compile_options("$<$:/utf-8>") -# needed for some MSVC installations -# 4099 : PDB 'filename' was not found with 'object/library' +# Needed for some MSVC installations, example warning: +# `4099 : PDB {filename} was not found with {object/library}`. string(APPEND CMAKE_EXE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") string(APPEND CMAKE_SHARED_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") string(APPEND CMAKE_MODULE_LINKER_FLAGS " /SAFESEH:NO /ignore:4099") diff --git a/extern/bullet2/CMakeLists.txt b/extern/bullet2/CMakeLists.txt index 6f90869d990..fbef90d64e6 100644 --- a/extern/bullet2/CMakeLists.txt +++ b/extern/bullet2/CMakeLists.txt @@ -406,7 +406,7 @@ set(LIB ) if(CMAKE_COMPILER_IS_GNUCXX) - # needed for gcc 4.6+ + # Needed for GCC 4.6+. string(APPEND CMAKE_CXX_FLAGS " -fpermissive") endif() diff --git a/extern/mantaflow/CMakeLists.txt b/extern/mantaflow/CMakeLists.txt index 92de6116f68..0db99461d1c 100644 --- a/extern/mantaflow/CMakeLists.txt +++ b/extern/mantaflow/CMakeLists.txt @@ -14,12 +14,12 @@ set(MANTAVERSION "0.13") add_definitions(-DWITH_FLUID=1) -# Compile Mantaflow dependencies too (e.g. cnpy for numpy file IO). +# Compile Mantaflow dependencies too (e.g. `cnpy` for NUMPY file IO). # Make sure that dependencies exist before enabling this option # by updating the source files in `extern/`. set(WITH_MANTA_DEPENDENCIES 0) -# Enable Mantaflow numpy support +# Enable Mantaflow NUMPY support. set(WITH_MANTA_NUMPY 0) if(NOT WITH_MANTA_DEPENDENCIES) @@ -251,8 +251,8 @@ blender_add_lib(extern_mantaflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") if(WITH_OPENVDB) # The VDB libs above are only added to as INTERFACE libs by blender_add_lib, # meaning extern_mantaflow itself actually does not have a dependency on the - # openvdb libraries, and CMAKE is free to link the vdb libs before + # OpenVDB libraries, and CMAKE is free to link the VDB libraries before # extern_mantaflow causing linker errors on linux. By explicitly declaring - # a dependency here, cmake will do the right thing. + # a dependency here, CMAKE will do the right thing. target_link_libraries(extern_mantaflow PRIVATE ${OPENVDB_LIBRARIES}) endif() diff --git a/intern/clog/CMakeLists.txt b/intern/clog/CMakeLists.txt index 707679c1b8c..29093ad9250 100644 --- a/intern/clog/CMakeLists.txt +++ b/intern/clog/CMakeLists.txt @@ -21,7 +21,7 @@ set(LIB PRIVATE bf::intern::atomic ) -# Disabled for makesdna/makesrna. +# Disabled for `makesdna` & `makesrna`. add_definitions(-DWITH_CLOG_PTHREADS) blender_add_lib(bf_intern_clog "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index c856b84f6d1..05c377f316c 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -25,8 +25,8 @@ if(NOT CYCLES_STANDALONE_REPOSITORY) endif() # Build Flags -# todo: this code could be refactored a bit to avoid duplication -# note: CXX_HAS_SSE42 is needed in case passing SSE flags fails altogether (gcc-arm) +# TODO: this code could be refactored a bit to avoid duplication. +# NOTE: CXX_HAS_SSE42 is needed in case passing SSE flags fails altogether (`gcc-arm`). if(WITH_CYCLES_NATIVE_ONLY) set(CXX_HAS_SSE42 FALSE) @@ -95,7 +95,7 @@ elseif(WIN32 AND MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") # grained control and the speedup we get here is too big to ignore. set(CYCLES_KERNEL_FLAGS "/fp:fast -D_CRT_SECURE_NO_WARNINGS /GS-") - # "jumptablerdata" improves performance when there is contention in large switch statements + # `jumptablerdata` improves performance when there is contention in large switch statements # such as in `svm.h`. # This flag is supported starting with MSVC 17.7 preview 3: # https://learn.microsoft.com/en-us/cpp/build/reference/jump-table-rdata @@ -128,13 +128,13 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) # Pass clang flags directly to clang otherwise. Clang-cl doesn't recognize # these flags by default set(CYCLES_KERNEL_FLAGS " /clang:-fno-trapping-math") - # Avoid overhead of setting errno for NaNs. + # Avoid overhead of setting `errno` for NaNs. string(APPEND CYCLES_KERNEL_FLAGS " /clang:-fno-math-errno") # Let compiler optimize 0.0 - x without worrying about signed zeros. string(APPEND CYCLES_KERNEL_FLAGS " /clang:-fno-signed-zeros") else() set(CYCLES_KERNEL_FLAGS " -fno-trapping-math") - # Avoid overhead of setting errno for NaNs. + # Avoid overhead of setting `errno` for NaNs. string(APPEND CYCLES_KERNEL_FLAGS " -fno-math-errno") # Let compiler optimize 0.0 - x without worrying about signed zeros. string(APPEND CYCLES_KERNEL_FLAGS " -fno-signed-zeros") diff --git a/intern/cycles/hydra/CMakeLists.txt b/intern/cycles/hydra/CMakeLists.txt index adcd4778ae5..d8ccaff3061 100644 --- a/intern/cycles/hydra/CMakeLists.txt +++ b/intern/cycles/hydra/CMakeLists.txt @@ -167,7 +167,7 @@ if(WITH_CYCLES_HYDRA_RENDER_DELEGATE) set(CYCLES_HYDRA_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/hydra) endif() - # Put the root plugInfo.json one level up + # Put the root `plugInfo.json` one level up. delayed_install("${CMAKE_CURRENT_SOURCE_DIR}" "plugInfo.json" ${CYCLES_HYDRA_INSTALL_PATH}) delayed_install("" $ ${CYCLES_HYDRA_INSTALL_PATH}) diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index 7f3252d4658..a5089645a9a 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -417,7 +417,7 @@ set(LIB ) -# Zstd compressor for kernels +# `Zstd` compressor for kernels. add_executable(zstd_compress ../cmake/zstd_compress.cpp) target_include_directories(zstd_compress SYSTEM PRIVATE ${ZSTD_INCLUDE_DIRS}) target_link_libraries(zstd_compress ${ZSTD_LIBRARIES} ${PTHREADS_LIBRARIES}) @@ -923,14 +923,14 @@ if(WITH_CYCLES_DEVICE_ONEAPI) set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "${CYCLES_ONEAPI_SYCL_OPTIONS_spir64}" CACHE STRING "Extra build options for spir64_gen target") mark_as_advanced(CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen) endif() - # Enable zebin, a graphics binary format with improved compatibility. + # Enable `zebin`, a graphics binary format with improved compatibility. string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "--format zebin ") # Host execution won't use GPU binaries, no need to compile them. if(WITH_CYCLES_ONEAPI_BINARIES AND NOT WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION) # Add the list of Intel devices to build binaries for. foreach(device ${CYCLES_ONEAPI_INTEL_BINARIES_ARCH}) - # Run ocloc ids to test if the device is supported. + # Run `ocloc` ids to test if the device is supported. if(WIN32) execute_process( COMMAND ${OCLOC_INSTALL_DIR}/ocloc.exe ids ${device} @@ -963,7 +963,7 @@ if(WITH_CYCLES_DEVICE_ONEAPI) string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "-device ${gen_devices_string} ") endif() - # Iterate over all targest and their options + # Iterate over all targets and their options. list(JOIN CYCLES_ONEAPI_SYCL_TARGETS "," targets_string) list(APPEND sycl_compiler_flags -fsycl-targets=${targets_string}) foreach(target ${CYCLES_ONEAPI_SYCL_TARGETS}) @@ -1084,8 +1084,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI) # until the compilation issues it triggers at either AoT or JIT stages gets fixed. list(APPEND sycl_compiler_flags -fhonor-nans) - # add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and - # libpi_level_zero.so can be placed next to it and get found. + # Add $ORIGIN to `cycles_kernel_oneapi.so` RPATH so `libsycl.so` and + # `libpi_level_zero.so` can be placed next to it and get found. list(APPEND sycl_compiler_flags -Wl,-rpath,'$$ORIGIN') endif() @@ -1114,13 +1114,14 @@ if(WITH_CYCLES_DEVICE_ONEAPI) add_custom_command( OUTPUT ${cycles_kernel_oneapi_lib} ${cycles_kernel_oneapi_linker_lib} COMMAND ${CMAKE_COMMAND} -E env - "LIB=${sycl_compiler_root}/../lib\;${sycl_compiler_root}/../compiler/lib/intel64_win" # for compiler to find sycl.lib and in case of icpx, libircmt.lib - "PATH=${OCLOC_INSTALL_DIR}\;${sycl_compiler_root}" - ${SYCL_COMPILER} - "$<$:${sycl_compiler_flags_Release}>" - "$<$:${sycl_compiler_flags_RelWithDebInfo}>" - "$<$:${sycl_compiler_flags_Debug}>" - "$<$:${sycl_compiler_flags_Release}>" + # Set `LIB` for the compiler to find `sycl.lib` and in case of `icpx`, `libircmt.lib`. + "LIB=${sycl_compiler_root}/../lib\;${sycl_compiler_root}/../compiler/lib/intel64_win" + "PATH=${OCLOC_INSTALL_DIR}\;${sycl_compiler_root}" + ${SYCL_COMPILER} + "$<$:${sycl_compiler_flags_Release}>" + "$<$:${sycl_compiler_flags_RelWithDebInfo}>" + "$<$:${sycl_compiler_flags_Debug}>" + "$<$:${sycl_compiler_flags_Release}>" COMMAND_EXPAND_LISTS DEPENDS ${cycles_oneapi_kernel_sources}) else() @@ -1188,12 +1189,12 @@ include_directories(SYSTEM ${INC_SYS}) if(WITH_COMPILER_ASAN) if(CMAKE_COMPILER_IS_GNUCC AND (NOT WITH_CYCLES_KERNEL_ASAN)) - # GCC hangs compiling the big kernel files with asan and release, so disable by default. + # GCC hangs compiling the big kernel files with ASAN and release, so disable by default. string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=all") string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") - # With OSL, Cycles disables rtti in some modules, which then breaks at linking - # when trying to use vptr sanitizer (included into 'undefined' general option). + # With OSL, Cycles disables RTTI in some modules, which then breaks at linking + # when trying to use `vptr` sanitizer (included into 'undefined' general option). string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -fno-sanitize=vptr") string(APPEND CMAKE_CXX_FLAGS_DEBUG " -fno-sanitize=vptr") endif() diff --git a/intern/cycles/kernel/device/hiprt/common.h b/intern/cycles/kernel/device/hiprt/common.h index 3e6fbc39477..743d7b537f0 100644 --- a/intern/cycles/kernel/device/hiprt/common.h +++ b/intern/cycles/kernel/device/hiprt/common.h @@ -319,7 +319,7 @@ ccl_device_inline bool point_custom_intersect(const hiprtRay &ray, hiprtHit &hit) { /* Point cloud intersections are currently disabled to decrease register pressure in the ray - * tracing kernels. This increases the number of inflight ray traversal waves, and fixes the + * tracing kernels. This increases the number of in-flight ray traversal waves, and fixes the * performance regression reported in #127464 */ # if defined(__POINTCLOUD__) && 0 RayPayload *local_payload = (RayPayload *)payload; diff --git a/intern/cycles/kernel/osl/CMakeLists.txt b/intern/cycles/kernel/osl/CMakeLists.txt index 7b30794d03e..a2c48c90c29 100644 --- a/intern/cycles/kernel/osl/CMakeLists.txt +++ b/intern/cycles/kernel/osl/CMakeLists.txt @@ -37,7 +37,7 @@ set(LIB if(APPLE) # Disable allocation warning on macOS prior to 10.14: the OSLRenderServices # contains member which is 64 bytes aligned (cache inside of OIIO's - # unordered_map_concurrent). This is not something what the SDK supportsm, but + # unordered_map_concurrent). This is not something what the SDK supports, but # since we take care of allocations ourselves is OK to ignore the # diagnostic message. string(APPEND CMAKE_CXX_FLAGS " -faligned-allocation") diff --git a/intern/cycles/kernel/osl/shaders/CMakeLists.txt b/intern/cycles/kernel/osl/shaders/CMakeLists.txt index 459362b037a..51617f1fea3 100644 --- a/intern/cycles/kernel/osl/shaders/CMakeLists.txt +++ b/intern/cycles/kernel/osl/shaders/CMakeLists.txt @@ -111,7 +111,7 @@ set(SRC_OSL ) # The headers that OSL ships differs per release so we can not -# hardcode this. +# hard-code this. file(GLOB SRC_OSL_HEADER_DIST ${OSL_SHADER_DIR}/*.h) set(SRC_OSL_HEADERS diff --git a/intern/ghost/test/CMakeLists.txt b/intern/ghost/test/CMakeLists.txt index b6f7a7e77b4..d5ee0d15260 100644 --- a/intern/ghost/test/CMakeLists.txt +++ b/intern/ghost/test/CMakeLists.txt @@ -26,7 +26,7 @@ set(WITH_GUARDEDALLOC ON) add_executable(datatoc "${CMAKE_SOURCE_DIR}/../../../source/blender/datatoc/datatoc.c") -# Fake the current source dir for includes. +# Fake the current source directory for includes. set(_CMAKE_CURRENT_SOURCE_DIR_INIT "${CMAKE_CURRENT_SOURCE_DIR}") # ----------------------------------------------------------------------------- @@ -71,7 +71,7 @@ endmacro() # set the endian define if(MSVC) - # for some reason this fails on msvc + # For some reason this fails on MSVC. add_definitions(-D__LITTLE_ENDIAN__) else() include(TestBigEndian) @@ -122,7 +122,7 @@ suffix_relpaths(SRC_NEW "${SRC}" "../../guardedalloc/") include_directories(${INC_NEW}) add_library(guardedalloc_lib ${SRC_NEW}) -# gpu (used by blenfont) +# `gpu` (used by `blenfont`). add_definitions(-DGPU_STANDALONE) set(CMAKE_CURRENT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../../source/blender/gpu") include(${CMAKE_SOURCE_DIR}/../../../source/blender/gpu/CMakeLists.txt) @@ -132,7 +132,7 @@ include_directories(${INC_NEW}) add_library(gpu_lib ${SRC_NEW}) set(CMAKE_CURRENT_SOURCE_DIR "${_CMAKE_CURRENT_SOURCE_DIR_INIT}") -# imbuf (used by ) +# `imbuf` (used by ???). # set(CMAKE_CURRENT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../../source/blender/imbuf") # include(${CMAKE_SOURCE_DIR}/../../../source/blender/imbuf/CMakeLists.txt) # suffix_relpaths(INC_NEW "${INC}" "../../../source/blender/imbuf/") @@ -141,26 +141,26 @@ set(CMAKE_CURRENT_SOURCE_DIR "${_CMAKE_CURRENT_SOURCE_DIR_INIT}") # add_library(imbuf_lib ${SRC_NEW}) # set(CMAKE_CURRENT_SOURCE_DIR "${_CMAKE_CURRENT_SOURCE_DIR_INIT}") -# blenfont +# `blenfont`. include(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont/CMakeLists.txt) suffix_relpaths(INC_NEW "${INC}" "../../../source/blender/blenfont/") suffix_relpaths(SRC_NEW "${SRC}" "../../../source/blender/blenfont/") include_directories(${INC_NEW}) add_library(blenfont_lib ${SRC_NEW}) -# wcwidth +# `wcwidth`. include(${CMAKE_SOURCE_DIR}/../../../extern/wcwidth/CMakeLists.txt) suffix_relpaths(INC_NEW "${INC}" "../../../extern/wcwidth/") suffix_relpaths(SRC_NEW "${SRC}" "../../../extern/wcwidth/") include_directories(${INC_NEW}) add_library(wcwidth_lib ${SRC_NEW}) -# grr, blenfont needs BLI +# Unfortunately `blenfont` needs `blenlib`. include_directories( "../../../source/blender/blenlib" ) -# Needed for math_matrix_c.cc to avoid eigen_capi.h dep. +# Needed for math_matrix_c.cc to avoid eigen_capi.h dependency. add_definitions(-DMATH_STANDALONE) add_library(bli_lib diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index d9ba4acf414..a15378c46d7 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -63,7 +63,7 @@ endif() blender_add_lib(bf_intern_guardedalloc "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") add_library(bf::intern::guardedalloc ALIAS bf_intern_guardedalloc) -# Override C++ alloc, optional. +# Override C++ allocator, optional. if(WITH_CXX_GUARDEDALLOC) set(SRC cpp/mallocn.cpp diff --git a/intern/mantaflow/CMakeLists.txt b/intern/mantaflow/CMakeLists.txt index 646938e9ef7..80599a30497 100644 --- a/intern/mantaflow/CMakeLists.txt +++ b/intern/mantaflow/CMakeLists.txt @@ -15,7 +15,7 @@ if(WIN32) endif() if(WIN32) - # Some files in extern are being included which brings up a bunch of + # Some files in `./extern` are being included which brings up a bunch of # "unreferenced formal parameter" warnings. # So restore warn C4100 (unreferenced formal parameter) back to w4 remove_cc_flag("/w34100") diff --git a/source/blender/animrig/ANIM_action_legacy.hh b/source/blender/animrig/ANIM_action_legacy.hh index 1f725132e3e..de4f7628b12 100644 --- a/source/blender/animrig/ANIM_action_legacy.hh +++ b/source/blender/animrig/ANIM_action_legacy.hh @@ -41,10 +41,10 @@ ChannelBag &channelbag_ensure(Action &action); * return all F-Curves for all slots/layers/strips. * * The use of this function is an indicator for code that might have to be - * inspected to see if this is _really_ the desired behaviour, or whether the + * inspected to see if this is _really_ the desired behavior, or whether the * F-Curves for a specific slot/layer/strip should be used instead. * - * \see blender::animrig::legacy::fcurves_for_action_slot + * \see #blender::animrig::legacy::fcurves_for_action_slot */ Vector fcurves_all(const bAction *action); Vector fcurves_all(bAction *action); @@ -58,8 +58,8 @@ Vector fcurves_all(bAction *action); * Actions feature is no longer experimental. When that switchover happens, calls to this function * can be replaced with the more efficient `blender::animrig::fcurves_for_action_slot()`. * - * \see blender::animrig::fcurves_for_action_slot - * \see blender::animrig::legacy::fcurves_all + * \see #blender::animrig::fcurves_for_action_slot + * \see #blender::animrig::legacy::fcurves_all */ Vector fcurves_for_action_slot(bAction *action, slot_handle_t slot_handle); Vector fcurves_for_action_slot(const bAction *action, slot_handle_t slot_handle); diff --git a/source/blender/blenlib/BLI_math_half.hh b/source/blender/blenlib/BLI_math_half.hh index 79816a36af0..380ea7f2799 100644 --- a/source/blender/blenlib/BLI_math_half.hh +++ b/source/blender/blenlib/BLI_math_half.hh @@ -15,7 +15,7 @@ namespace blender::math { /** * Float (FP32) <-> Half (FP16) conversion functions. * - * Behavior matches hardware (x64 F16C, ARM NEON fcvt), + * Behavior matches hardware (x64 F16C, ARM NEON FCVT), * including handling of denormals, infinities, NaNs, rounding * is to nearest even, etc. When NaNs are produced, the exact * bit pattern might not match hardware, but it will still be a NaN. diff --git a/source/blender/blenlib/tests/BLI_math_half_test.cc b/source/blender/blenlib/tests/BLI_math_half_test.cc index 841f698cc59..0cf210bf8ce 100644 --- a/source/blender/blenlib/tests/BLI_math_half_test.cc +++ b/source/blender/blenlib/tests/BLI_math_half_test.cc @@ -85,12 +85,12 @@ TEST(math_half, float_to_half_scalar) * This is time taken to convert 100 million numbers FP16 -> FP32. * * - CPU: F16C instructions 44ms - * - OpenEXR/Imath: 21ms - * - blender::math::half_to_float: 164ms - * - convert_float_formats from VK_data_conversion.hh: 244ms [converts 2046 values wrong] + * - `OpenEXR/Imath`: 21ms + * - `blender::math::half_to_float`: 164ms + * - `convert_float_formats` from `VK_data_conversion.hh`: 244ms [converts 2046 values wrong] * * On Mac M1 Max (Clang 15): - * - blender::math::half_to_float: 127ms (C), 97ms (NEON vcvt) + * - `blender::math::half_to_float`: 127ms (C), 97ms (NEON VCVT) */ TEST(math_half_perf, half_to_float_scalar) { @@ -111,12 +111,12 @@ TEST(math_half_perf, half_to_float_scalar) * This is time taken to convert 100 million numbers FP32 -> FP16. * * - CPU: F16C instructions 61ms - * - OpenEXR/Imath: 240ms - * - blender::math::float_to_half: 242ms - * - convert_float_formats from VK_data_conversion.hh: 247ms [converts many values wrong] + * - `OpenEXR/Imath`: 240ms + * - `blender::math::float_to_half`: 242ms + * - `convert_float_formats` from `VK_data_conversion.hh`: 247ms [converts many values wrong] * * On Mac M1 Max (Clang 15): - * - blender::math::half_to_float: 198ms (C), 97ms (NEON vcvt) + * - `blender::math::half_to_float`: 198ms (C), 97ms (NEON VCVT) */ TEST(math_half_perf, float_to_half_scalar_math) // 242ms { diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 74b6bd422c0..c7a71e612b6 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -117,7 +117,7 @@ if(WITH_GTESTS) ) blender_add_lib(bf_blenloader_test_util "${TEST_UTIL_SRC}" "${TEST_UTIL_INC}" "${TEST_UTIL_INC_SYS}" "${TEST_UTIL_LIB}") - # Actual blenloader tests. + # Actual `blenloader` tests. set(TEST_SRC tests/blendfile_load_test.cc ) diff --git a/source/blender/blentranslation/msgfmt/CMakeLists.txt b/source/blender/blentranslation/msgfmt/CMakeLists.txt index c2cc33364ff..22b9e46740c 100644 --- a/source/blender/blentranslation/msgfmt/CMakeLists.txt +++ b/source/blender/blentranslation/msgfmt/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later # ----------------------------------------------------------------------------- -# Build msgfmt executable +# Build `msgfmt` executable. set(INC ) diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt index fefaba3b890..b67ee09244b 100644 --- a/source/blender/bmesh/CMakeLists.txt +++ b/source/blender/bmesh/CMakeLists.txt @@ -204,7 +204,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt index 5b9ba5d8036..4a8f276ddc5 100644 --- a/source/blender/compositor/CMakeLists.txt +++ b/source/blender/compositor/CMakeLists.txt @@ -578,7 +578,7 @@ if(WITH_COMPOSITOR_CPU) if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/compositor/realtime_compositor/CMakeLists.txt b/source/blender/compositor/realtime_compositor/CMakeLists.txt index 0288c02bfb5..d42e3f31b8e 100644 --- a/source/blender/compositor/realtime_compositor/CMakeLists.txt +++ b/source/blender/compositor/realtime_compositor/CMakeLists.txt @@ -375,7 +375,7 @@ file(GENERATE OUTPUT ${shader_create_info_list_file} CONTENT "${SHADER_CREATE_IN if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/cpucheck/CMakeLists.txt b/source/blender/cpucheck/CMakeLists.txt index 7367786f423..75571aced0a 100644 --- a/source/blender/cpucheck/CMakeLists.txt +++ b/source/blender/cpucheck/CMakeLists.txt @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -# The cpu check module cannot build with sse42 since it will be executed -# by cpus that may not support these instructions +# The CPU check module cannot build with sse42 since it will be executed +# by CPU's that may not support these instructions. set(SRC cpu_check.cc diff --git a/source/blender/datatoc/CMakeLists.txt b/source/blender/datatoc/CMakeLists.txt index 0351d39c337..689b3b93e37 100644 --- a/source/blender/datatoc/CMakeLists.txt +++ b/source/blender/datatoc/CMakeLists.txt @@ -4,10 +4,10 @@ # ----------------------------------------------------------------------------- -# Build datatoc executable +# Build `datatoc` executable. set(SRC datatoc.cc ) -# SRC_DNA_INC is defined in the parent dir +# `SRC_DNA_INC` is defined in the parent directory. add_executable(datatoc ${SRC}) diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index de6738f021f..634d5cefa54 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -891,7 +891,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/draw/intern/shaders/draw_resource_finalize_comp.glsl b/source/blender/draw/intern/shaders/draw_resource_finalize_comp.glsl index 457ddc7b752..8b715cd3f99 100644 --- a/source/blender/draw/intern/shaders/draw_resource_finalize_comp.glsl +++ b/source/blender/draw/intern/shaders/draw_resource_finalize_comp.glsl @@ -52,7 +52,7 @@ void main() bounds.bounding_sphere.w = -2.0; } - /* Bypass culling test for objects that are flattenned on one or more axes (see #127774). + /* Bypass culling test for objects that are flattened on one or more axes (see #127774). * Fixing them is too much computation but might be worth doing if a use case for it. * Do not compute the real length to save some instructions. */ vec3 object_scale = vec3(reduce_add(abs(model_mat[0].xyz)), diff --git a/source/blender/editors/curves/CMakeLists.txt b/source/blender/editors/curves/CMakeLists.txt index c71d693ba3b..a8a2e0b95b5 100644 --- a/source/blender/editors/curves/CMakeLists.txt +++ b/source/blender/editors/curves/CMakeLists.txt @@ -47,7 +47,7 @@ set(LIB if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc index 5115f0ec18c..844cf3f1d3e 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_edit.cc @@ -2717,8 +2717,8 @@ static int grease_pencil_reproject_exec(bContext *C, wmOperator *op) scene.toolsettings); const int oldframe = int(DEG_get_ctime(depsgraph)); - /* TODO: This can probably be optimized further for the non-Surface projection usecase by - * considering all drawings for the parallel loop instead of having to partition by frame number + /* TODO: This can probably be optimized further for the non-Surface projection use case by + * considering all drawings for the parallel loop instead of having to partition by frame number. */ if (keep_original) { const Vector drawings = retrieve_editable_drawings(scene, grease_pencil); diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt index 5792010ef53..7f37ae1e9a9 100644 --- a/source/blender/editors/render/CMakeLists.txt +++ b/source/blender/editors/render/CMakeLists.txt @@ -63,7 +63,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 27d944723f3..a43b8468d95 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -218,8 +218,8 @@ if(WITH_GTESTS) blender_add_test_suite_lib(editor_sculpt_paint "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${TEST_LIB}") endif() -# If compiling with msvc clang we need to add the D_LIBCPP_VERSION define -# so we don't run into tbb errors when compiling with lib +# If compiling with MSVC clang we need to add the `D_LIBCPP_VERSION` define +# so we don't run into TBB errors when compiling with lib. if(WITH_TBB AND MSVC_CLANG) string(APPEND CMAKE_CXX_FLAGS " /D_LIBCPP_VERSION") endif() diff --git a/source/blender/editors/sculpt_paint/sculpt_automask.hh b/source/blender/editors/sculpt_paint/sculpt_automask.hh index d0754b7b77d..8bb4e825d60 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automask.hh +++ b/source/blender/editors/sculpt_paint/sculpt_automask.hh @@ -51,7 +51,7 @@ struct Settings { struct Cache { Settings settings; - /* Cached factor for automasking modes that are implemented to process the entire mesh. */ + /** Cached factor for auto-masking modes that are implemented to process the entire mesh. */ Array factor; enum class OcclusionValue : int8_t { @@ -81,14 +81,16 @@ struct Cache { uchar current_stroke_id; }; -/* Returns the automasking cache depending on the active tool. Used for code that can run both for - * brushes and filter. */ +/** + * Returns the auto-masking cache depending on the active tool. Used for code that can run both for + * brushes and filter. + */ const Cache *active_cache_get(const SculptSession &ss); /** - * Creates and initializes an automasking cache. + * Creates and initializes an auto-masking cache. * - * For automasking modes that cannot be calculated in real time, + * For auto-masking modes that cannot be calculated in real time, * data is also stored at the vertex level prior to the stroke starting. */ std::unique_ptr cache_init(const Depsgraph &depsgraph, const Sculpt &sd, Object &ob); diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.cc b/source/blender/editors/sculpt_paint/sculpt_expand.cc index c226dc5a4dd..11631e352b4 100644 --- a/source/blender/editors/sculpt_paint/sculpt_expand.cc +++ b/source/blender/editors/sculpt_paint/sculpt_expand.cc @@ -2154,7 +2154,7 @@ static bool set_initial_components_for_mouse(bContext *C, const int last_active_vert_index = ss.last_active_vert_index(); /* It still may be the case that there is no last active vert in rare circumstances for * everyday usage. - * (i.e. if the cursor has never been over the mesh at all. A solutoin to both this problem + * (i.e. if the cursor has never been over the mesh at all. A solution to both this problem * and needing to store this data is to figure out which is the nearest vertex to the current * cursor position */ if (last_active_vert_index == -1) { diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 0b1a4db3241..5c67c314610 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -91,8 +91,8 @@ endif() if(WITH_TBB) if(WIN32) - # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # TBB includes `Windows.h` which will define min/max macros + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt index d472be6b232..93b1307a351 100644 --- a/source/blender/functions/CMakeLists.txt +++ b/source/blender/functions/CMakeLists.txt @@ -50,7 +50,7 @@ set(LIB if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 481d6912b54..e3ee67e643a 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -18,7 +18,7 @@ set(INC # For theme color access. ../editors/include - # For *_info.hh includes. + # For `*_info.hh` includes. ../compositor/realtime_compositor ../draw/engines/eevee_next ../draw/engines/gpencil @@ -884,7 +884,7 @@ endif() if(WITH_GPU_BUILDTIME_SHADER_BUILDER) set(_manifest) if(WIN32) - # We can re-use the manifest from tests.exe here since it's + # We can re-use the manifest from `tests.exe` here since it's # rather generic and just selects the appropriate common # controls version. set(_manifest "${CMAKE_BINARY_DIR}/tests.exe.manifest") @@ -977,7 +977,7 @@ if(WITH_GTESTS) ) endif() - # Enable shader validation on buildbot for Metal + # Enable shader validation on build-bot for Metal if(WITH_METAL_BACKEND AND NOT WITH_GPU_DRAW_TESTS) list(APPEND TEST_SRC tests/shader_create_info_test.cc diff --git a/source/blender/io/gpencil_legacy/CMakeLists.txt b/source/blender/io/gpencil_legacy/CMakeLists.txt index e6cca621721..c68e9b524d1 100644 --- a/source/blender/io/gpencil_legacy/CMakeLists.txt +++ b/source/blender/io/gpencil_legacy/CMakeLists.txt @@ -72,7 +72,7 @@ if(WITH_HARU) # Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF. # Can be removed with Haru 2.4.0. They should be shipping with their own - # Fax codes defined by default from that version onwards. + # Fax codes defined by default from that version onward. ${TIFF_LIBRARY} ) add_definitions(-DWITH_HARU) diff --git a/source/blender/io/grease_pencil/CMakeLists.txt b/source/blender/io/grease_pencil/CMakeLists.txt index 70709fa60fa..17cc92a3d29 100644 --- a/source/blender/io/grease_pencil/CMakeLists.txt +++ b/source/blender/io/grease_pencil/CMakeLists.txt @@ -67,7 +67,7 @@ if(WITH_HARU) # Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF. # Can be removed with Haru 2.4.0. They should be shipping with their own - # Fax codes defined by default from that version onwards. + # Fax codes defined by default from that version onward. ${TIFF_LIBRARY} ) add_definitions(-DWITH_HARU) diff --git a/source/blender/io/usd/CMakeLists.txt b/source/blender/io/usd/CMakeLists.txt index 691b0986411..f0f27e0187e 100644 --- a/source/blender/io/usd/CMakeLists.txt +++ b/source/blender/io/usd/CMakeLists.txt @@ -14,7 +14,7 @@ if(WIN32) endif() add_definitions(-DBOOST_ALL_NO_LIB) -# Precompiled Linux libs are made with GCC, and USD uses some extensions +# Pre-compiled Linux libraries are made with GCC, and USD uses some extensions # which lead to an incompatible ABI for Clang. Using those extensions with # Clang as well works around the issue. if(UNIX AND NOT APPLE) diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt index 6a31304e27d..ed2a738e970 100644 --- a/source/blender/makesdna/intern/CMakeLists.txt +++ b/source/blender/makesdna/intern/CMakeLists.txt @@ -2,8 +2,6 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -# message(STATUS "Configuring makesdna") - set(INC PUBLIC .. PUBLIC ${CMAKE_CURRENT_BINARY_DIR} @@ -43,9 +41,9 @@ file(GENERATE OUTPUT ${dna_header_include_file} CONTENT "${DNA_INCLUDE_TEXT}") file(GENERATE OUTPUT ${dna_header_string_file} CONTENT "${DNA_FILE_LIST}") # ----------------------------------------------------------------------------- -# Build makesdna executable +# Build `makesdna` executable. -# Subset of blenlib used by makesdna. +# Subset of `blenlib` used by `makesdna`. set(BLENLIB_SRC ../../blenlib/intern/BLI_assert.c ../../blenlib/intern/BLI_ghash.c @@ -81,7 +79,7 @@ if(WITH_COMPILER_ASAN) ) endif() -# SRC_DNA_INC is defined in the parent dir +# `SRC_DNA_INC` is defined in the parent directory. add_cc_flags_custom_test(makesdna) diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 4e826bcaaa4..98d6fce683c 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -440,7 +440,7 @@ if(WITH_GMP) add_definitions(-DWITH_GMP) endif() -# Build makesrna executable +# Build `makesrna` executable. add_cc_flags_custom_test(makesrna) add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index 9f2f4bb80c2..cc8b24bcb13 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -218,7 +218,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 462feacca0d..eed8b791596 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -163,7 +163,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/nodes/geometry/CMakeLists.txt b/source/blender/nodes/geometry/CMakeLists.txt index c76bd9e8cf4..3d0907db2dc 100644 --- a/source/blender/nodes/geometry/CMakeLists.txt +++ b/source/blender/nodes/geometry/CMakeLists.txt @@ -293,7 +293,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() @@ -339,8 +339,8 @@ list(APPEND LIB bf_nodes_geometry_generated ) -# If compiling with msvc clang we need to add the D_LIBCPP_VERSION define -# so we don't run into tbb errors when compiling with lib +# If compiling with MSVC clang we need to add the `D_LIBCPP_VERSION` define +# so we don't run into TBB errors when compiling with lib. if(WITH_TBB AND MSVC_CLANG) string(APPEND CMAKE_CXX_FLAGS " /D_LIBCPP_VERSION") endif() diff --git a/source/blender/nodes/shader/CMakeLists.txt b/source/blender/nodes/shader/CMakeLists.txt index 8294a2ec4f5..46dc092f419 100644 --- a/source/blender/nodes/shader/CMakeLists.txt +++ b/source/blender/nodes/shader/CMakeLists.txt @@ -173,7 +173,7 @@ endif() if(WITH_TBB) if(WIN32) # TBB includes Windows.h which will define min/max macros - # that will collide with the stl versions. + # that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() endif() diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt index 8de55b583e9..c671af02364 100644 --- a/source/blender/python/intern/CMakeLists.txt +++ b/source/blender/python/intern/CMakeLists.txt @@ -135,7 +135,7 @@ set(LIB ${PYTHON_LIBRARIES} ) -# only to check if buildinfo is available +# Only to check if `buildinfo` is available. if(WITH_BUILDINFO) add_definitions(-DBUILD_DATE) endif() diff --git a/source/blender/render/hydra/CMakeLists.txt b/source/blender/render/hydra/CMakeLists.txt index 89a3a3d8c80..cb7b1351261 100644 --- a/source/blender/render/hydra/CMakeLists.txt +++ b/source/blender/render/hydra/CMakeLists.txt @@ -14,7 +14,7 @@ if(WIN32) endif() add_definitions(-DBOOST_ALL_NO_LIB) -# Precompiled Linux libs are made with GCC, and USD uses some extensions +# Pre-compiled Linux libraries are made with GCC, and USD uses some extensions # which lead to an incompatible ABI for Clang. Using those extensions with # Clang as well works around the issue. if(UNIX AND NOT APPLE) diff --git a/source/blender/sequencer/intern/modifier.cc b/source/blender/sequencer/intern/modifier.cc index 796a9a571c8..534b93fe9d7 100644 --- a/source/blender/sequencer/intern/modifier.cc +++ b/source/blender/sequencer/intern/modifier.cc @@ -1297,8 +1297,8 @@ static AreaLuminance tonemap_calc_input_luminance(const StripScreenQuad &quad, c [&](const IndexRange y_range, const AreaLuminance &init) { AreaLuminance lum = init; const int64_t chunk_size = y_range.size() * ibuf->x; - /* For float images, convert to scene-linear inplace. The rest - * of tonemapper can then continue with scene-linear values. */ + /* For float images, convert to scene-linear in place. The rest + * of tone-mapper can then continue with scene-linear values. */ if (ibuf->float_buffer.data != nullptr) { float4 *fptr = reinterpret_cast(ibuf->float_buffer.data); fptr += y_range.first() * ibuf->x; diff --git a/source/blender/windowmanager/intern/wm_gesture_ops.cc b/source/blender/windowmanager/intern/wm_gesture_ops.cc index 9015dd7975a..91c762fafbe 100644 --- a/source/blender/windowmanager/intern/wm_gesture_ops.cc +++ b/source/blender/windowmanager/intern/wm_gesture_ops.cc @@ -767,11 +767,12 @@ static int gesture_polyline_valid_points(const wmGesture &wmGesture, const bool return (wmGesture.mval.x == prev_x && wmGesture.mval.y == prev_y) ? num_points : num_points + 1; } -/* Evaluates whether the polyline has at least three points and represents +/** + * Evaluates whether the poly-line has at least three points and represents * a shape and can be submitted for other gesture operators to act on. * * We handle clicking within the original point radius differently than double clicking or - * submitting through the confirm keybinds, as the user expects to NOT add a new point when + * submitting through the confirm key-bindings, as the user expects to *not* add a new point when * interacting with this targeted area. */ static bool gesture_polyline_can_apply(const wmGesture &wmGesture, const bool is_click_submitted) diff --git a/source/blender/windowmanager/intern/wm_splash_screen.cc b/source/blender/windowmanager/intern/wm_splash_screen.cc index 08c1fe4b653..b351b96d991 100644 --- a/source/blender/windowmanager/intern/wm_splash_screen.cc +++ b/source/blender/windowmanager/intern/wm_splash_screen.cc @@ -203,7 +203,7 @@ static void wm_block_splash_close_on_fileselect(bContext *C, void *arg1, void * #if defined(__APPLE__) /* Check if Blender is running under Rosetta for the purpose of displaying a splash screen warning. * From Apple's WWDC 2020 Session - Explore the new system architecture of Apple Silicon Macs. - * Timecode: 14:31 - https://developer.apple.com/videos/play/wwdc2020/10686/ */ + * Time code: 14:31 - https://developer.apple.com/videos/play/wwdc2020/10686/ */ # include diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index a5dac69c46f..3516cfd8c73 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -82,7 +82,7 @@ if(WITH_TBB) endif() if(WIN32) - # Windows.h will define min/max macros that will collide with the stl versions. + # Windows.h will define min/max macros that will collide with the STL versions. add_definitions(-DNOMINMAX) endif() @@ -417,8 +417,8 @@ elseif(APPLE) set(TARGETDIR_VER "./bpy/${BLENDER_VERSION}") set(TARGETDIR_LIB "./bpy/lib") else() - # Paths defined in terms of site-packages since the site-packages - # directory can be a symlink (brew for example). + # Paths defined in terms of `site-packages` since the `site-packages` + # directory can be a symbolic-link (brew for example). set(TARGETDIR_BPY ${PYTHON_SITE_PACKAGES}/bpy) set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/bpy/${BLENDER_VERSION}) set(TARGETDIR_LIB ${PYTHON_SITE_PACKAGES}/bpy/lib) @@ -795,7 +795,7 @@ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libglapi.so.0.0.0)\n ) if(DEFINED LIBDIR) - # Precompiled libraries, copy over complete lib directory. + # Pre-compiled libraries, copy over complete lib directory. install_dir( ${PYTHON_LIBPATH} ${TARGETDIR_VER}/python @@ -809,7 +809,8 @@ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libglapi.so.0.0.0)\n # On some platforms (like openSUSE) Python is linked to be used from `lib64` directory. # determine this from Python's libraries path. - # Ugh, its possible `lib64` is just a symlink to 'lib' which causes incorrect use of `lib64`. + # Ugh, its possible `lib64` is just a symbolic-link to `lib` + # which causes incorrect use of `lib64`. get_filename_component(_pypath_real ${PYTHON_LIBPATH} REALPATH) if(${_pypath_real} MATCHES "lib64$") set(_target_LIB "lib64") @@ -882,7 +883,7 @@ file(REMOVE ${CMAKE_BINARY_DIR}/bin/lib/libglapi.so.0.0.0)\n if(WITH_USD) # Install to the same directory as the source, so debian-like - # distros are happy with their policy. + # distributions are happy with their policy. set(_suffix "site-packages") if(0) # TODO: `PYTHON_USD_PATH` isn't defined anywhere. if(${PYTHON_USD_PATH} MATCHES "dist-packages") @@ -1116,8 +1117,8 @@ elseif(WIN32) ) if(WITH_WINDOWS_RELEASE_PDB) - # Skip install of stripped pdb if compiling with clang since there doesn't seem - # to be a pdbstripped version for clang-cl + # Skip install of stripped PDB if compiling with clang since there doesn't seem + # to be a PDB-stripped version for `clang-cl`. if(WITH_WINDOWS_RELEASE_STRIPPED_PDB AND NOT MSVC_CLANG) # Icky hack for older CMAKE from https://stackoverflow.com/a/21198501 # `$` will work in newer CMAKE but the version currently (3.12) @@ -1796,11 +1797,11 @@ if(WITH_USD) absolute_include_dirs(../blender/io/usd) endif() -# Always install USD shared library and datafiles regardless if Blender +# Always install USD shared library and `datafiles` regardless if Blender # itself uses them, the bundled Python module still needs it. if((DEFINED LIBDIR) AND TARGETDIR_LIB) - # On windows the usd library sits in ./blender.shared copy the files - # relative to the location of the USD dll, if the dll does not exist + # On windows the USD library sits in `./blender.shared` copy the files + # relative to the location of the USD DLL, if the DLL does not exist # assume we are linking against the static 3.5 lib. if(WITH_USD) if(WIN32 AND